Adobe Dreamweaver Forums



Last 10 THreads :         Charts: Gap between Vertical Axis and the chart area (Last Post : flexisawesome - Replies : 1 - Views : 2 )           »          Dragging components (Last Post : hsfrey - Replies : 4 - Views : 5 )           »          Pop up window using AS3 (Last Post : retsnomrev - Replies : 3 - Views : 4 )           »          can a combobox contain two different list seperated byvdivider ? (Last Post : v-Jay - Replies : 2 - Views : 6 )           »          Refreshing xml data in flex (Last Post : PiyushGiri01 - Replies : 2 - Views : 19 )           »          Integrating Captivate with ASP - SQL? (Last Post : bikturisint - Replies : 19 - Views : 131 )           »          Re: IPhone (Last Post : MiLSaN99 - Replies : 0 - Views : 1 )           »          Re: IPhone (Last Post : MiLSaN99 - Replies : 0 - Views : 1 )           »          Re: IPhone (Last Post : MiLSaN99 - Replies : 0 - Views : 1 )           »          Re: IPhone (Last Post : MiLSaN99 - Replies : 0 - Views : 1 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Director > Lingo
 
Tags:



Reply
  #1 (permalink)  
Old 11-21-2008, 01:05 PM
DAVID NAJAR
 
Posts: n/a
Diggs:
Default Re: export image in D11

Hi,

Im using SharpExport Xtra on D11 and everything is ok!!!

I leave you my handler for image save, this save the image of the stage but
easily could be modify to save any bitmap member by args (ex: saveImageFile(me,
aBitmapMember)). I hope this help you.



on saveImageFile(me)
vObjectFileIO = 0
vObjectFileIO = new(xtra "fileio")
setfiltermask(vObjectFileIO, "PNG,*.png,JPG,*.jpg")
vFilePath = vObjectFileIO.displaySave("SAVE IMAGE", "image")
vObjectFileIO = 0
if not voidP(vFilePath) and not (vFilePath = EMPTY) then
vTempMember = new(#bitmap, p.DynamicCastLib)
vTempMember.image = _movie.stage.image.duplicate()
vCurrentDelimiter = the itemDelimiter
the itemDelimiter = "."
vExtension = the last item of vFilePath
the itemDelimiter = vCurrentDelimiter
vXtra = new (xtra "SharpExport")
vResult = -1
case vExtension of
"png":
vResult = vXtra.exportPNG(vTempMember, vFilePath)
otherwise:
vResult = vXtra.exportJPG(vTempMember, vFilePath,100)
end case
vTempMember.erase()
vTempMember = VOID
vXtra = 0
if vResult <> 0 then
vError = "Saving image error: "
case vResult of
-1: vError = vError & "destination file can not be written"
-2: vError = vError & "out of memory"
-3: vError = vError & "wrong number of args"
-4: vError = vError & "bad parameter"
-5: vError = vError & "castmember not found"
-6: vError = vError & "castmember media not found"
-7: vError = vError & "castmember is not a bitmap"
-8: vError = vError & "unsupported bitdepth (JPEG support is 8 bits or
higher)"
-9: vError = vError & "JPEG compression failed (internal error with
JPEG library)"
-10: vError = vError & "PNG compression failed (internal error with
PNG library)"
otherwise: vError = vError & "unknown error"
end case
alert(vError)
end if
return 1
else
return 0
end if
end



Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 07:33 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk