[swfmill] PNG Compression
Ralf Fuest
ralf-fuest at gmx.de
Thu Apr 24 03:48:05 PDT 2008
You can get smaller files by using the mask attribute. You'll need to
use two files, one jpg image with the color information and a 8bit png
alpha mask. Example:
<clip id="id0" import="1.jpg" mask="1_alpha.png"/>
Ralf
> I have a question regarding png compression in swfmill. Below is an
> example of an xml file that I'm running:
>
> <?xml version='1.0' encoding='iso-8859-1' ?>
> <movie version='9' frames='5' width='242' height='160'>
> <FileAttributes hasMetaData='0' allowABC='1'
> suppressCrossDomainCaching='0' swfRelativeURLs='0' useNetwork='0'/>
> <background color='#FFFFFF'/>
> <frame>
> <library>
> <clip id='id0' import='1.png'/>
> </library>
> <place id='id0' depth='1' x='15' y='1.75' scale='0.5' />
> </frame>
> <frame>
> <library>
> <clip id='id1' import='2.png'/>
> </library>
> <place id='id1' depth='1' x='13.3' y='0' scale='0.5' />
> </frame>
> ...
> </movie>
>
> I run this with the command "swfmill simple myxml.xml output.swf". I
> haven't rebuilt my swfmill code in a few months (I'm using revision
> 234 from svn). A quick glance at the changelogs for the revisions
> since 234 and I don't see anything that would address this problem. I
> can always rebuild from source if I need to though.
>
> In total, I have 4 frames. The original png images are about 85kb a
> piece. When I run this and create my output swf, the resulting size is
> around 450kb. 85*4 is 340kb. I'm curious where the extra 110kb is
> coming from. If I take the resulting swf, open it in the Flash CS3,
> and output it as a movie with compression on and a jpeg quality of 80,
> I can get a swf with a size of around 150kb.
>
> My question is: Is there anyway I can achieve this kind of compression
> with swfmill? And if so, how? is there a param that I should add to
> the <place> tag? I'm using pngs because I need transparency support,
> and even given the Flash IDE's jpeg compression, it compresses but
> still keeps all of my transparency intact.
>
> Any suggestions?
>
> Thanks,
>
> -- Joel
> _______________________________________________
> swfmill mailing list
> swfmill at osflash.org
> http://osflash.org/mailman/listinfo/swfmill_osflash.org
More information about the swfmill
mailing list