Test case: if we clut a gradient with a gradient, we should get a gradient. Windows BAT script.
Code: Select all
rem Official Windows binary release v6.8.9-5:
%IM%convert ^
-size 100x100 gradient: ^
( -size 1x10 gradient: -rotate 90 ) ^
-clut ^
clut_c1.png
Code: Select all
rem Self-compiled on Cygwin Q32 v6.8.9-6, bad result:
%IM32i%convert ^
-size 100x100 gradient: ^
( -size 1x10 gradient: -rotate 90 ) ^
-clut ^
clut_c2.png
clut_c2.png is very nearly black. It should be a gradient.
I've looked at ClutImageChannel(...) in enhance.c, and the 4 versions of ScaleQuantumToMap, and I can't figure out the bug.
Contrast Stretch and Equalize seem to work fine in Q32.