It may happen in some cases that you want to work with vector images, but the starting images are bitmaps, this small tutorial explains how to transform a Bitmap image (GIF, JPEG, PNG) into vector graphic (SVG) .
Bitmap, Vecor, what is it ?
To don’t make any mistake here are the definitions proposed by Wikipedia:
- A bitmap image is a digital image data in a format that consists of an array of pixels or color dots, usually rectangular, which can be visualized on a computer monitor or other display device RGB (red, green, blue).
- A vector image is a digital image composed of individual geometric objects (line segments, polygons, arcs, etc.) each defined by various attributes of shape, position, color, etc.
The main advantage of working on Vector images, is the fact that we can apply all kinds of transformations (rotations, stretching, …) without loss of quality.
Prepare the Bitmap (The Gimp)
We start from this, we will try to create a vector image, there are however some preliminary steps to do to ensure success of this operation. We have seen that a vector image is described by a succession of shapes in different colors, so fewer colors there are in image, less the vector image will be complex.
We realize that it includes 175 colors, visibly there are only yellow and black. It is appropriate to lower the number of colors. Personally I spend the image in RGB mode: Menu->Image->Mode->RVB, then I will return to indexed mode : Menu->Image->Mode->Indexed colors.
Transform image into Vector (Inkscape)
Here the settings i use:
- Vectorization by color
- Indicate the number of passes at least equivalent to the number of colors in the image
Then just save the job into australie.svg
- You can downlod this image at OpenClipart.org : https://openclipart.org/detail/202683/australia-sign
We have just seen that the vectorization operation of an image is very simple, however I would give some tips:
- Do not attempt the operation with a too complex image because if there are too many colors the result is likely to be catastrophic
- Be careful to minimize the maximum number of colors
- Always use when vectorization a number of passes at least equivalent to the number of colors in your image
There, that’s done, have fun.
Note that the images of this post are distributed under license Creative Commons By Sa.