Imported image color replacement output discrepancy (resolved)

What i wanted to do in the image here was to change the black color to transparent.


But i got an undesired, final image instead. It honestly might not be a bug but something i’ve done. But just to make sure, i’m posting here.


  1. Opened a new, blank project with this color palette:
  • Transparency here is set to index 255
  • Could’ve been any palette, this was just what was in my settings at the time.
  1. Imported a large image with these settings:
  • After import, transparency here was somehow changed to index 0 (white color in the palette)
  1. Re-set the transparency index into 255
  • with this tool:
  1. Interchange black and transparent colors in the canvas. (Using Morintaris’ color replacer formula)
  • This is how it looks like in the canvas:
  • Normally, the white color at the lower right of the canvas should be the transparent-checkered pattern.
  1. Export it via File > Save image as...
  • Exported PNG looks like this:
  • zoomed in:
  • The black color is gone. Replaced by the transparent-checkered pattern as desired. Honestly, as is, this is a usable spritesheet already.
  • But the white color in the image doesn’t seem like it should be there.

  • OG imported image deets:
  • Exported image deets:

PMNG ver.

Hi @cageburner ,

can you please send me the palette as file that you initially load as well as the image file that you imported. This way I can check it the way you use it. Using other palettes or other images might not lead to the bug.


Update in this thread: mailed the files over.

The project you created used alpha transparency and the imported image as well. Changing a transparent color of an alpha project only means: for all pixels that are transparent, use that color index on the color plane. That’s all it does. This color should be white which is an equivalent to have “no color”.

When using a project with color index based (=simple) transparency you have no alpha plane that defines transparency value per pixel (0-100%).
When you change the transparent color index then the transparency changes accordingly.

As far as I can see the image you want to edit only uses alpha 0 or 100%, so it actually wants to be a simple transparent image. You should create a project with your palette with simple transparency and then import the image.

If you stay on alpha transparent mode you need to use the fill tool and fill all areas you want to have transparent. Changing the color index is not enough because it affects the color plane only but leaves alpha plane untouched.

When you exported the image you used “256 color PNG” which then preferred (oddly) the defined transparent color instead of the alpha plane.

1 Like

Thanks Jan,

I love how in depth and detailed the reply is. Will keep this in mind, and probably keep coming back to this post when i encounter a similar issue from now on.