request: exact output colormap specification

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
holistone
Posts: 13
Joined: 2012-06-29T10:56:44-07:00
Authentication code: 13

request: exact output colormap specification

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: request: exact output colormap specification

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
holistone
Posts: 13
Joined: 2012-06-29T10:56:44-07:00
Authentication code: 13

Re: request: exact output colormap specification

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: request: exact output colormap specification

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply