swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swftools-common] (patch supplied) Allow swfextract to extract alpha mas


From: David Croft
Subject: [Swftools-common] (patch supplied) Allow swfextract to extract alpha mask
Date: Mon, 30 Nov 2009 20:35:38 +0100

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

[Prev in Thread] Current Thread [Next in Thread]