Natalian

SVG size

I was having a look at the SVG version from the feed icons site and I was surprised how well it rendered.

Interestingly the SVG file is just 1.2kb! Gzipped, it’s 545bytes. A PNG 32×32 pixel version is 1.5kb and the 10×10 is 469 bytes. I wonder how the PNG format’s size grows with the pixel size. SVG’s size won’t grow, though that’s a lie; surely memory whilst rendering the SVG will grow at some rate whilst zooming into it?

I was thinking SVG would be great for mobiles, but it is hard to argue the case. For example, rendering the SVG is surely harder than to decode a bitmap image. Also, what is the point of scaling up into an SVG graphic (on a mobile) anyway?

Perhaps we are still better with a JPEG2000 type approach. as bitmaps are far more common than vector graphics. Sadly, JPEG2000 is heavily patented. How frustrating. :(

9 Responses to “SVG size”

  1. Joose Vettenranta Says:

    Well, I think it depends on SVG-implementation. I acually heard that in some cases it would be easier to render svg than showing bitmap. But to think when that would happen, well, when you have GPU and you can output svg as vectors to that GPU.. then it would be fast, wouldn’t it!

    SVG as replacement for say, icons, would be ideal for web-environment, because then you could easily scale it on mobile-browsers to small-size and on desktops with big big resolution to big size.. in PNG/JPEG/GIF -format.. you normally might render it as 100ppi display…

    – Joose

  2. hendry Says:

    ICONs are the typical application for SVG. As graphics go this is surely a small slice of the graphics market. As bitmaps, they generally they pose a problem because of their size either. So SVG’s impact is sort of severely limited.

    Is there was some special GPU for SVG, yeah, it probably would be fast. Though I doubt rendering SVG hardware is all that easy/cheap.

  3. Joose Vettenranta Says:

    Icons are good to make with SVG, but there is more where to use it! Like cartoons in web would be nice to do with SVG, and maps… those just came to my mind.

    Where I use SVG is to visualize data anlysis. I have software which generates XML-file from data. That XML file I convert to XSL-FO format with XSL-T and graphics I do as inline SVG. Then my converter makes that fo to PDF file. And it also makes SVG as PDF-vectors so I can go and print very very good quality graphics =) I’m thinkin doing same with HTML, so I could kinda “preview” results before doing the PDF stuff. So HTML + inline SVG = one very easy software (or in my case, xsl-t).

    – Joose

  4. hendry Says:

    Keeping your data in XML? Are you nuts? I would just generate the SVG from a DB or something. :)

    What is the tool to create the PDF from HTML with SVG inline called?

    Did you notice how odd the rendering are between object and embed in your example? http://dabase.com/svg/text.html

    Thanks for your comments Joose!

  5. Joose Vettenranta Says:

    I’m not keeping data in XML. I have data in DB. Process goes like: DB -> java objects -> XML -> XML-FO + SVG -> PDF.

    I don’t know any tool to create PDF from HTML with SVG inlie.. Maybe if using XHTML and inline SVG then you could create XSL-T from XHTML to XSL-FO and then convert that to PDF.

    Nope, I didn’t have time to chech that out yet =)

    – Joose

  6. Robbert Says:

    SVG is already used a lot for mobile applications. In fact there is a mobile variant of the normal SVG spec, SVG Basic or SVG Tiny. Most recent mobile browsers support SVG Tiny. If the regular webbrowsers would just implement SVG support then u would be able to create a graphic once and scale it for al kinds of user agents without loss of quality.

  7. hendry Says:

    Which mobile browsers Robbert?

    There are only 3 worth mentioning: the Nokia S60 browser (based on Webkit), Netfront and Opera.

    Which?

  8. hendry Says:

    Another very depressing thing I have noticed about SVG support in Firefox 1.5 is how it DOES NOT SCALE.

    Alter the text size with CTRL-+ or minus and what do you expect? http://dabase.com/svg/text.html

    I expected the SVG graphic to resize along with the text!

  9. Kai Hendry Says:

    I just tried Opera9 here and it didn’t render the fecking icon. sigh

Leave a Reply