[magick-users] support for changing an image pallette?
Bob Friesenhahn
bfriesen at simple.dallas.tx.us
Wed Nov 6 10:24:36 PST 2002
On Wed, 6 Nov 2002, Dave Rigby wrote:
> I'm currently evaluating Imagemagick++ for use in an image processing
> project; having previously using imlib2 I have run into some limitations
> of that library.
> However, there's a couple of things I need to know about imagemagick,
> and I could't find out from the docs so here goes....
>
> I need to be able to alter the palette of an image, e.g. change colour
> 0 to bright red
> However, I don't seem to see any way to obtain the palette / insert a
> new one with imagemagick++I? I need this to do stuff like normalising
> the image histogram / or create monochrome images using a specific
> threshold.
Assuming that the image is in PseudoClass representation, you can do
this via the colorMap() method:
Color red("red");
image.colorMap(0,red);
Bob
======================================
Bob Friesenhahn
bfriesen at simple.dallas.tx.us
http://www.simplesystems.org/users/bfriesen
More information about the Magick-users
mailing list