Problems using remap

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
slavka012
Posts: 2
Joined: 2011-07-25T11:07:23-07:00
Authentication code: 8675308

Problems using remap

Post by slavka012 »

I'm doing some work on images, and I one thing that I needed was all the images to have the same color maps.

The initial graphics was prepared in Photoshop, so that was easily done.

Now, at the next stage, I need reorder the colors according to their popularity. I extracted the histogram info from the combined image, then created a 16x16 image containing the colors I need in a specific order. Its color map is exactly what I need.

Here is the palette image, and the one I'm try to apply the palette to:
Image

Image

Now, when I execute

Code: Select all

convert All-Sizes_05.gif -remap outpal.gif tmp.pcx
the color table gets reordered all right, but not to the requested order!

What is wrong? Any help would be highly appreciated.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Problems using remap

Post by anthony »

IMv6 does not preserve color order in the palette. :-(

This is something that has been requested for the current IMv7 (alpha) development.

EG; preserve the original or requested palette an use it if all colors fit that palette.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
slavka012
Posts: 2
Joined: 2011-07-25T11:07:23-07:00
Authentication code: 8675308

Re: Problems using remap

Post by slavka012 »

Thanks for your answer. The funny thing is it does work on PCX files, just not on gifs. Unfortunately I could not use it on PCX since I need to preserve transparency info.

Anyway, I hope that this feature will be implemented soon.
Post Reply