Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

IamgeMagick dcouments its -clut option as "Replace the channel values in the first image using each corresponding channel in the second image as a color lookup table...This operator is especially suited to replacing a grayscale image with a specific color gradient from the CLUT image."

Ok, so I have IN.png (greyscale, 800x259) and Gradient.png (1x256, colored). The documentation suggests (but does not say) that the command should be convert IN.png Gradient.png -clut OUT.png. However, that just copies Gradient.png to OUT.png. (Bitwise identical, even). Reversing the first two arguments will copy IN.png to OUT.png, again unmodified.

The desired result is of course a 800x259 colored image, using the values from IN.png and the colors from Gradient.png. What is the correct syntax for this?

share|improve this question
What is your ImageMagick version and platform? – dlemstra Mar 17 '14 at 21:39
6.6.9 IIRC (not near the machine). Weirdly enough, I finally did get it working. Can't figure out anymore what the difference was. I do remember that my first attempts put -clut second, but that resulted in file I/O errors on both the gradient inputy and the output file. That was fairly easily figured out, despite the incorrect error message ("read error" on gradient input) – MSalters Mar 17 '14 at 22:50

You must log in to answer this question.

Browse other questions tagged .