Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 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 at 22:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.