ricardocabellov5.0balter-egos
trace mr.doob r08028
blogdemoscenefeaturedextrascontact
 *blog... kind of... *rss

« Demozoo.org:-) »

PNG2SWF (JPEG Compressed)
08.08.2007
I needed to convert a couple of .PNGs to .SWFs for a project today. I did a quick search and I wasn't able to find something easy to use for this, and the ones I found usually just embedded the .PNG in the .SWF, which is exactly what I didn't want.

At the time of publishing a flash project with .PNG images, if you set the images on your library to be compressed to .JPG, if there is any PNG with alpha channel, flash will save the color information with JPEG compression and leave the transparency information with PNG lossless compression.

The end result it's like having a JPEG with Alpha channel, which, actually, it's something you can only have in Flash (compared to html).

Seems like the easiest way to handle the issue was creating a .JSFL file to automatise all this. I never had to do a .JSFL script before, so forgive me if I did something bad on it.

Anyway, in case you ever need it, here you have:

png2swf.jsfl
(Flash IDE script, Run it from Commands)

Enjoy!

PS: The files that I had to compress went from 4mb in total to 900kb :)
posted by mr.doob at 10:12
0 comment written so far

SORRY!
Is not that I don't care about what you have to say, of course I do, but they are speaking louder and I lost my patience :(
 *profile 



traditional id: Ricardo Cabello Miguel
based in: London, UK
serving to: Hi-ReS!
contact me: click here


 *latest posts 

* Showcase is back, now in Javascript (19.11.2008)
* Zeh's Fnk (15.11.2008)
* Lupen III (Italian Opening) VS Captain... (08.11.2008)
* Duuuuude! (31.10.2008)
* Pump 'N Seal, Jackie Chan, Manuela and... (26.10.2008)
* Ubuntu 8.10 on a Macbook Pro (25.10.2008)
* Ubuntu 8.04, Apple Keyboard - Change F... (22.10.2008)
* Rules for making the internet a better... (21.10.2008)
* The Magic of Viral (10.10.2008)
* Jonathan Harris: Beyond Flash, an adde... (06.10.2008)
* Zeitgeist: Addendum (05.10.2008)
* Crisis (03.10.2008)
* Youtube, now in Super HD! (30.09.2008)
* Adobe AIR for Linux - Beta (28.09.2008)
* What does the Google Chrome logo inspi... (28.09.2008)


 *latest comments 

* C++, SDL Coding? Maybe.. ;) (Preview) (trace)
* C++, SDL Coding? Maybe.. ;) (Preview) (Joey)
* La picaresca (spt)
* Mr. Slip Up (ricardo)
* La picaresca (ricardo)
* La picaresca (spt)
* La picaresca (sole)
* Demoscene @ Cirsa (sml)
* La picaresca (humphr3y)
* La picaresca (alfio)
* fiver2's new baby: debris (Jcl)
* Barcelona = full of shit(s) (Soli)
* Demoscene @ Cirsa (Scener)
* Rar & unrar with Ubuntu (SethPlate)
* Mindcandy 2 (Jcl)


 *wish list