Thursday, June 5, 2008

Advantages and shortcomings of SVG images

After a bit of experimenting with SVG graphics, I've reached the following conclusions:

  • I can't figure out how to get SVG graphics to resize automatically in a browser based on an HTML tag. I know how to add an SVG using the <object> tag, but changing the <object> size doesn't scale the image, it crops instead.
  • SVG tutorials ignore the subject, or discuss the <transform> and <preserveAspectRatio> tags, both of which are in the original XML, not the HTML.
  • So, SVGs on a website need to be properly sized before the web browser gets them - one SVG can't be reused at different sizes. Resizing is trivial in Inkscape, but you still need two images for two sizes - that stinks.
  • Basic SVG images are supported by all the common browsers.
  • SVG images are very handy for line drawings like basic maps and diagrams.
  • In print, SVG images saved as .odg OpenOffice Drawing images are very useful replacements for frequently used graphics in business cards, flyers, contracts, etc.
  • SVGs are good for icons/logos since they scale well.

The upshot is that I'll keep file archives in SVG for future manipulation, resized SVGs for web use, and exported ODGs for print media.

Wishlist:

  1. SVG can be scaled by HTML tags
  2. OpenOffice imports SVG natively

No comments: