Attached is a patch for swfextract.c allowing you to extract the alpha
mask from DefineBitsJPEG3 tags. It is against the latest
2009-08-24-2042 source.

When extracting a JPEG with "-j", the new "-a" option can be used to
specify the file to save the alpha channel into (if found). The file
is output as a 8bpp greyscale PNG. This can then easily be combined
with the JPEG as required, for example using ImageMagick:

$ ./swfextract source.swf -j 6 -o extracted-image.jpg -a extracted-alpha.png
$ convert extracted-image.jpg extracted-alpha.png -compose
copy_opacity -composite out.png

Example output: http://www.davidc.net/~david/pics/swftools/

Please accept this patch for the next version of swftools.

Regards,

David Croft

Attachment: swftools-swfextract-alpha.patch
Description: Binary data

Reply via email to