-clut command changes in v7?

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
chaoscarnage
Posts: 93
Joined: 2012-12-31T15:56:29-07:00
Authentication code: 6789

-clut command changes in v7?

Post by chaoscarnage »

We used to use -clut to recolor some images and after upgrading to version 7 it doesn't appear to work the same way.

Code: Select all

img1.png grad.png -clut -newimg.png
Now it seems to just splat one color all over the image without applying the gradient along the greyscale.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -clut command changes in v7?

Post by fmw42 »

Please supply your exact IM version and platform and your two input image. You can upload to any free hosting service and put the URLs here. Is your img1 grayscale and grad color or the other way around or what?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -clut command changes in v7?

Post by fmw42 »

It seems to work fine for me using IM 7.0.5.10 Mac OSX Sierra

Input:
Image

Code: Select all

magick \( -size 256x256 gradient: \) \( rainbow.jpg -gravity north -crop 600x1+0+0 +repage \) -clut result1.png
Image

Input:
Image

Code: Select all

magick logo.png \( -size 1x256 gradient: -rotate 90 -gamma 1.5 \) -clut result2.png
Image
chaoscarnage
Posts: 93
Joined: 2012-12-31T15:56:29-07:00
Authentication code: 6789

Re: -clut command changes in v7?

Post by chaoscarnage »

Here is an imgur album with images and the resulting image http://imgur.com/a/7u5Oa

I used

Code: Select all

 convert grey.png rainbow.png -clut newimg.png
Linux Ubuntu 14.04.5 LTS

Version: ImageMagick 7.0.5-7 Q16 x86_64 2017-05-25
chaoscarnage
Posts: 93
Joined: 2012-12-31T15:56:29-07:00
Authentication code: 6789

Re: -clut command changes in v7?

Post by chaoscarnage »

EDIT: updated album with how it turns out in version 6
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: -clut command changes in v7?

Post by Bonzo »

Looks like the transparency is being coloured.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: -clut command changes in v7?

Post by magick »

Try

Code: Select all

convert -channel RGB grey.png rainbow.png -clut newimg.png
See https://www.imagemagick.org/script/porting.php.
chaoscarnage
Posts: 93
Joined: 2012-12-31T15:56:29-07:00
Authentication code: 6789

Re: -clut command changes in v7?

Post by chaoscarnage »

Thanks for the quick response! Looks good!
Post Reply