possible bug LCH colorspace IM 6.8.4.6 Mac OSX
Posted: 2013-04-02T18:55:09-07:00
I have been testing the following commands to compare LCH and HCL colorspaces. The following are simple round trips. It works fine for HCL but not for LCH.
This works fine for HCL
hue=1
chr=1
lum=1
convert rose: -set colorspace RGB -colorspace HCL -separate +channel \
\( -clone 0 -evaluate multiply $hue \) \
\( -clone 1 -evaluate multiply $chr \) \
\( -clone 2 -evaluate multiply $lum \) \
-delete 0-2 -set colorspace HCL -combine -colorspace RGB -set colorspace sRGB \
test_hcl_${hue}_${sat}_${lum}.png
This is not correct for LCH
lum=1
chr=1
hue=1
convert rose: -set colorspace RGB -colorspace LCH -separate +channel \
\( -clone 0 -evaluate multiply $lum \) \
\( -clone 1 -evaluate multiply $chr \) \
\( -clone 2 -evaluate multiply $hue \) \
-delete 0-2 -set colorspace LCH -combine -colorspace RGB -set colorspace sRGB \
test_lch_${hue}_${sat}_${lum}.png
This works fine for HCL
hue=1
chr=1
lum=1
convert rose: -set colorspace RGB -colorspace HCL -separate +channel \
\( -clone 0 -evaluate multiply $hue \) \
\( -clone 1 -evaluate multiply $chr \) \
\( -clone 2 -evaluate multiply $lum \) \
-delete 0-2 -set colorspace HCL -combine -colorspace RGB -set colorspace sRGB \
test_hcl_${hue}_${sat}_${lum}.png
This is not correct for LCH
lum=1
chr=1
hue=1
convert rose: -set colorspace RGB -colorspace LCH -separate +channel \
\( -clone 0 -evaluate multiply $lum \) \
\( -clone 1 -evaluate multiply $chr \) \
\( -clone 2 -evaluate multiply $hue \) \
-delete 0-2 -set colorspace LCH -combine -colorspace RGB -set colorspace sRGB \
test_lch_${hue}_${sat}_${lum}.png