Showing posts with label odg. Show all posts
Showing posts with label odg. Show all posts

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

Saturday, April 5, 2008

Converting bitmap images to vector graphics

Our sign contractor for the store created some beautiful graphics - but the disk they gave us was all .jpg and bitmap .pdf and even a bitmap .ai file. Limited usefulness for reuse unless we can convert them to vector graphics - bitmaps are big and pixellated, vectors are small and infinitely scalable smoothly.

Used Inkscape. Turned out to be incredibly easy. Import the bitmap, then Path -> Trace Bitmap. Next, File -> Document Properties to crop the page area (so it doesn't save as one logo in the corner of an empty sheet of paper). Save the converted file.

Next problem: Inkscape saves as .svg, but OpenOffice can't open it. Easy to fix - instead of .svg, have Inkscape save as .odg, an OpenOffice drawing file. I love when things work out.

Monochrome and color laser prints of the converted graphics are great - no pixels, smooth and clean edges. Interesting: The bitmaps look better on screen, but the vector graphics are superior on paper.