![]() |
![]() |
||||||
|
|||||||
| Tags: |
![]() |
|
|||
|
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 |
| Sponsored Links |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise