How to reduce number of colors in raster image

To use image for automatic conversion into vectors, you may need to reduce number of colors. Mapwel software reduces number of colors automatically, but you may need to use the same color palette for several images. In such a case, reduce colors manually, save the color palette and use it for other images too.

Following short tutorial explains color reduction in Photoshop and in GIMP (free program for image manipulation).

If you have Adobe Photoshop, you can use following approach:

1. Use Photoshop > main menu > Image > Mode > Indexed Color to open window for color reduction.

Sample image - autovectorization    Sample image - autovectorization

2. Select no dither, no transparency and set required number of colors. Select any type of palette that works best for your image.

Sample image - autovectorization    Sample image - autovectorization

3. Image with reduced number of colors lacks blue color for pool. We will add it manually. Undo the color reduction and repeat step 1. However, select 'Custom' palette in this case. Please note: in this simple example number of colors is reduced to 9, but Mapwel software supports much more colors.

Sample image - autovectorization

4. Custom palette contains 9 color automatically selected in previous color reduction. Add light blue color as 10th color into palette and click OK. Image now contains 10 colors and light blue is among them. Save image into BMP, GIF or PNG format to avoid colors distortion (do not use JPG format for the same reason).

Sample image - autovectorization   Sample image - autovectorization

Color reduction in GIMP

In GIMP, please use 3 simple steps illustrated on below pictures. GIMP is a free program for image manipulation. Installation files for Windows are a available from http://gimp-win.sourceforge.net

Sample image - autovectorization

Image with large number of colors.

Sample image - autovectorization

Select image > mode > indexed to reduce colors.

Sample image - autovectorization

Choose number of colors.