• jan@cosmigo.com

Wrong color indexing when importing a picture with the correct palette

I have just downloaded the free version of the tool since I got curious about color cycling. While doing some general testing, I’m trying to see if I can get the Transport Tycoon Deluxe water cycle working from a screenshot. I’ve imported the game’s palette, you can get it here:


The last row of blues between the pinks and the yellow is the water cycle.

This is the screenshot that I’m importing:


A rough screen capture gif of what the water cycle looks like ingame:


And a gif of what it looks like in PMNG:


I’ve noticed that when I paste the picture into the editor, some subtle color differences get crushed, i.e. colors that are too close to each other get indexed as the same color. I double-checked this by comparing hex values of each individual pixel in and out of the tool. There should be no reason this is happening since all the colors are already in the palette when I’m importing the picture, so there is no need for the algorithm to try and find the nearest color.

The problem persists when I do Edit/Get Brush -> Colors/Import Colors from Brush with Remap Brush Colors enabled.

This is my first day using the tool so it’s also possible the problem is in me. If that’s the case I’d like to know what I’m doing wrong, because I’ve been trying to figure this out for hours.

When you open/import an image in PM NG there are various options on how to handle the palette — you should get a dialog with the various options when opening/importing images. Among the various options there is in fact a palette optimization algorithm that will reduce colors as you described, but you can also keep the original palette as it is, or adapt the image to the current palette.

These options can be set globally on the application and (if I remember correctly) also per project.

So, most likely what you’ve experienced is just a matter of settings, or having imported the image in way that skips the palette adaptation dialogs.

I’m not getting a dialog when importing images, nor do I see an option in preferences to turn this on. The image always gets instantly imported with the wrong colors no matter how I import it (as an image, a frame, a brush etc.).

Hi @Drury,

imho the screenshot is the problem. Screenshots are typically not indexed. So the pixel to color palette mapping gets lost.
Each pixel has its own color value (RGB, true color). When importing into PM a new palette must be built from that and this won’t match the palette you have.
Can you also make the screenshot available for download? Maybe it gives me some hint about how to manually rearrange colors of the generated palette to make it fit to you palette.
BTW, no import options are displayed if the image contains no more than 256 colors, actually. In such cases the colors are all taken into the color palette.