Page 1 of 1

request: exact output colormap specification

Posted: 2012-06-30T09:37:48-07:00
by holistone
I am trying to exactly specify the colormap of a .gif image. Although the -remap option does use the specified colors, it shuffles the order in the output colormap. The original discussion is found in the User Forum viewtopic.php?f=1&t=21322&p=87006#p87006

I would like an option or flag to force the exact same colormap in the pseudocolor output as specified by -remap. As now seems to be the case, there is no way to specify that pseudocolor output has a specific colormap.

Re: request: exact output colormap specification

Posted: 2012-07-03T21:25:40-07:00
by anthony
This was also requested for IMv7 development which has a 'special' channel to hold an images color map.
How far this development has gone is not known at this time, probably only a minimal amount.

Re: request: exact output colormap specification

Posted: 2012-07-04T12:37:17-07:00
by holistone
If someone could point me to the relevant section/files of source code for the -remap implementation, I might be able to get a working version for my own use.

Re: request: exact output colormap specification

Posted: 2012-07-04T18:55:11-07:00
by anthony
that will not help much.

Remap works by filling in a color oct-tree with the colors to do quantization against. It does not actually set the colormap (which in IM v6 is stored in the images optional Black Channel)

Any change would be best part of IMv7.


NOTE IM is a general image processor, as as such tends to fail for things that are very specific to a specific image file format. You can use tools designed for that specific format to do this sort of thing.

It will improve though, especially if you like to go into the source and submit a patch. -- Please DO -- we are all very busy with other aspect of development.