Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command prompt convert png to swf

I want to let a user upload a PNG-file with alpha transparency and have it compiled by the server to a swf-file with jpeg compression on the embedded PNG-file.

How can I make this happen?

I thought first I'd just construct a class and compile it with Flex Framework, but Flex does not compress the embedded PNG-files. You who have tried have probably ended up making an assets.swf file compiled from within the Flash IDE.

Any thoughts appreciated.

Kind regards, nitech

like image 410
nitech Avatar asked Nov 18 '25 19:11

nitech


2 Answers

In the swftools package there is a command png2swf. Use the -j switch for jpeg compression.

like image 153
rcs Avatar answered Nov 20 '25 17:11

rcs


Try ImageMagick, I recall seeing it used by a lot of shared-hosting web-servers. It can be executed on the command line or in scripts.

like image 34
Matt Joiner Avatar answered Nov 20 '25 18:11

Matt Joiner