clut question

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
yakir
Posts: 8
Joined: 2013-01-25T13:45:23-07:00
Authentication code: 6789

clut question

Post by yakir »

Yay, it worked! Thanks!

After reading some more, I realized that I might want to do something slightly different (let me know if I should post a new question). I want the following to happen:
Each pixel in the out.png image looks up what RGB value it needs to have by using the corresponding pixel in the in.png image as an index in a look-up-table (which is the cmap.png). This means that the LUT has exactly 256 unique colors for a UInt8 in.png image. While this may accomplish the (almost) exact same thing as the -clut operator, it seems to me like it would be much much faster. Is there something like that in imagemagick?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: clut question

Post by fmw42 »

I split your topic into two. Perhaps what you want is -recolor. See http://www.imagemagick.org/Usage/quantize/#remap

EDIT: I meant -remap, not -recolor
yakir
Posts: 8
Joined: 2013-01-25T13:45:23-07:00
Authentication code: 6789

Re: clut question

Post by yakir »

This worked really well. I checked the remap operator before, but what I needed was the recolor. Thanks a bunch!!!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: clut question

Post by fmw42 »

Sorry, I wrote -recolor, but meant (and linked to) -remap. -recolor is quite different and now called -color-matrix. See http://www.imagemagick.org/script/comma ... lor-matrix
Post Reply