views:

195

answers:

2

Hi,

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

+1  A: 

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.

Matt Joiner
Wow! I didn't know ImageMagick handles swf files! This works but it doesn't compress the image to JPG. I guess an extra step would easily resolve that.
LiraNuna
It has? According to the documentation, it hasn't...
Martin Hohenberg
hey I don't know what it does, i just recall seeing it on a server! ;D
Matt Joiner
+3  A: 

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

rcs
Superb :-) Just what I needed.
nitech