Re: [Flashcoders] AS3 SVG embedding resources
Hi all and thanks for the input. I agree with Dave that the svg does look bloated compared to swf, and Claus and Jaco's explanations make sense for why this is. So far from what I found I agree with Jaco that there is no golden rule for predicting filesize when embedding svgs except that usually the swf will be smaller. I tried some of the suggested Inkscape optimising tips (ungroup,convert to paths, removing metadata/gradient definitions) and others (Vacuum Defs, Paths simplify) but none had a notable filesize impact once that particular svg was embedded in Flash (although they do benefit other svgs). The main culprit seems to be the three shadows below the base and one once they were removed from the svg took the resulting swf from 63k down to 30k which is roughly the svg/swf ratio I would expect. One related thing I found is : Original monitor svg = 64k adds 63k to the swf when embedded alone Edited monitor svg = 69k adds 30k to the swf when embedded alone Embedding BOTH svg files in the SAME swf adds only 63k to the swf I am guessing that the reason why is that when converting embedded svgs to swf the Flex2 SDK caches paths and gradients converts them to symbols in the library so that if it finds the same definition in another embedded svg it pulls it out of the library instead of recreating it. But I would need to test it some more to be sure. Cool if it is though. I put up the edited examples and a new post here http://www.dehash.com/?p=41 if anyone wants to follow it up. -gary ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS3 SVG embedding resources
63K for that monitor? And it's vector? That's useless. A bitmap would be way smaller... Why are svg's so bloated? And why the heck would you want to use them? Dave - Head Developer www.blurredistinction.com Adobe Community Expert http://www.adobe.com/communities/experts/ ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS3 SVG embedding resources
hi, I don't think final filesize is predictable, generally speaking swf tends to be smaller than the relevant svg, but it's not the rule. Smaller filesize is often obtained because of binary format in swf while svg is text format, even gzipped (svgz). For complex svg (e.g. many clipped path, exotic gradients and line/fill style, fonts) final swf can be very larger. Think the best way to evaluate file size is: - optimize in inkscape: ungroup, convert to paths, cleanup unused tags and so on - batch conversion and then embed swf, wich filesize is already known my 2eurocent opinion :) Jaco - pixeldump - Original Message - From: info dehash [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, October 20, 2006 6:46 PM Subject: [Flashcoders] AS3 SVG embedding resources Hi all I am looking for some AS3/SVG resources in general. In particular I am hoping for some guidlines for predicting how many kb embedding a svg will add to a swf ? I did a quick test just now here http://www.dehash.com/?p=35 and found it to be quite varied. Hope that makes sense -gary ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS3 SVG embedding resources
Thanks for the additional info. Using the those four example images just threw me off then, as any one of those images done in swf would be tiny compared to the svg counterpart. Dave - Head Developer www.blurredistinction.com Adobe Community Expert http://www.adobe.com/communities/experts/ ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS3 SVG embedding resources
63K for that monitor? And it's vector? That's useless. A bitmap would be way smaller... Why are svg's so bloated? And why the heck would you want to use them? Most likely the authoring tool is to blame. That SVG contains loads of gradient definitions (dunno if they are all absolutely needed, i would guess not), and a lot of injected metadata. I cleaned only the metadata and the resulting SVG is 52k. If you compress that, you end up with not even 5k. Not too much i guess, given that the SVG itself seems not very optimized. Cheers, Claus. -- claus wahlers cĂ´deazur brasil http://codeazur.com.br ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com