SVG — Scalable Vector Graphics

SVG is a quite interesting technology for a computer programmer as it makes it possible to create images with a text editor.

SVG images can be used in web pages. You can define SVG-based images inside HTML code of a page. SVG code looks like conventional HTML code, but there are certain differences.

In addition it is possible to create SVG-based images in .svg files, and convert them to other image formats, such as PNG images.

There are tools like Inkscape with which you can make SVG-based images. With Inkscape you can also convert SVG images to PNG images.

In the following table you can find links to some HTML pages in which SVG images are used. You can thus learn some basics of SVG coding.


 
 
 
 
 
 
 
 

 

Using Inkscape for .svg to .png Conversion

If you have the Inkscape tool installed on Windows, you can use it also in the Command Prompt Window.

If you have a folder named C:\imagework and in that folder you have an image file named some_image.svg, you can convert it to a .png file by giving the following commands in the Command Prompt Window:

C:
cd imagework
"c:\Program Files\Inkscape\bin\inkscape" -o target_file.png -w 256 some_image.svg
      

In the command above, the width of the resulting image is set to 256 pixels, and the height of the image is set so that it corresponds with the original picture ratio.

It is, of course, possible to use the Graphical User Interface of Inkscape to make conversions like the one above.

Another tool for working with .svg files is Adobe Illustrator, but the author of this page has no experience about that tool.