gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Graphics > Color Manipulation Program for DS or GBA images

#45727 - TheMikaus - Tue Jun 14, 2005 5:55 am

I wrote this program here http://www.themikausprojects.com/neoflash/imagePaletteFix.exe
That lets you see how many colors an image uses (uniques) and then map a range of colors to a base color. For instance you can say anything that is the color Black + 25 (to R, G, B) is considered black and will be replaced with it, which depending on your graphic can save you a butt load of color spots (especially on gradients).

So far it works best on grayscales, but I think that's because I haven't been using the ranges correctly.

Usage ->
Click "Load Image" Find the image you want to use and load it.
This will populate one of the boxes with colors and extend its scrollbar (these are the colors in the image and you can move the scroll bar to change the color)

Next to this color box is description of the selected color (R,G,B) double click this box to select it in the filters section. Click the box next to the filters section to bring up a color chooser. This is used just to assign the tolerance values for the R,G,B if you select a color with 25,25,25 then it'll be your color.R + 25, color.G + 25... etc.
Click "Add Filter"
then click "Refilter Image" (this may take some time) but it should tell you how many colors there are now in the image after the filter is applied.

If you want to see what it looks like click the preview image button and if you like what you see you can click "Save Image" (but you'll need to save it as a different name than the original image or it'll crash)

You can add more than one filter at a time. And sometimes the program acts funny.

Hope someone finds it of some use.

Oh and I'll release the source code later (it's in C#) I just want my site fixed up a bit first (which in be in a while)