Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2.10 for Colormap - Python-fu or other way
#1
Hi. Im working with sprites and 8 bit backgrounds. I have to convert them to 8 bit (usually irfan view because without Floydd Steinberg dithering reducing colors in gimp makes them really like some ink color spill poor quality, maybe it exists in gimp dunno).



[Image: QoMZY.png]

What I also have to do is when  I have an image with 256 color map, I need to add a color to the color map and it has to be first color of the palette (top left corner), it will be used for transparency. Usually BEFORE I convert to 8 bit, I have to make a pixel on the image with the wanted color and then convert the image to 256 colors so that the desired color is included in the palette. Then brush the pixel off the image. This takes a lof of time to do for multiple images.

Is there a way to automate this with script or other way?

For example add a color without messing up the rest of the palette or replacing black color where e.g you will see magenta on an image because you replaced the black in it with magenta.

And then once you add the color to the palette, position it as first. I use it with Color - Map - Rearrange color map but firstly need to add the color to the palette then automate its rearrangement.

Irfanview wont let me have the image with just 255 colors not 256 so that it won''t replace an existing color if I added a 256th color
Reply
#2
I have played with the colormap API a bit in the past but IIRC this doesn't alter the pixel values in the layers, so if you insert a color at the beginning the pixels assume a new color. However a recent discussion makes me think that Gimp could insert the "transparent color" properly if you just add an alpha channel to the layer.
Reply


Forum Jump: