Page 1 of 1

possible bug reporting LAB values IM 6.8.9.6 Q16 MacOSX

Posted: 2014-08-01T14:56:33-07:00
by fmw42
I am not getting consistent results between fx: and pixel: and txt:

txt: seems to be the oddball for the AB components.


It looks to me like txt is unbiased and fx: and pixel: are 50% biased. Is this intentional?

Code: Select all

convert -size 1x1 xc:red -set colorspace sRGB -colorspace LAB -format "%[fx:mean.r] %[fx:mean.g] %[fx:mean.b]\n" info:
0.532311 0.814176 0.763607

Code: Select all

convert -size 1x1 xc:red -set colorspace sRGB -colorspace LAB -format "%[fx:u.r] %[fx:u.g] %[fx:u.b]\n" info:
0.532311 0.814176 0.763607

Code: Select all

convert -size 1x1 xc:red -set colorspace sRGB -colorspace LAB -format "%[pixel:u.p{0,0}]\n" info:
cielab(53.2311%,81.4176%,76.3607%)

Code: Select all

convert -size 1x1 xc:red -set colorspace sRGB -colorspace LAB txt:
# ImageMagick pixel enumeration: 1,1,65535,cielab
0,0: (53.2311%,31.4168%,26.36%) #8845506D437B cielab(53.2311%,31.4168%,26.36%)


convert -version
Version: ImageMagick 6.8.9-6 Q16 x86_64 2014-07-28 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules
Delegates: bzlib cairo fftw fontconfig freetype gslib jbig jng jp2 jpeg lcms lqr ltdl lzma openexr png ps rsvg tiff webp x xml zlib

Re: possible bug reporting LAB values IM 6.8.9.6 Q16 MacOSX

Posted: 2014-08-01T15:06:04-07:00
by fmw42
Testing with white, I get

Code: Select all

convert -size 1x1 xc:white -set colorspace sRGB -colorspace LAB -format "%[fx:u.r] %[fx:u.g] %[fx:u.b]\n" info:
0.999985 0.500038 0.499931

Code: Select all

convert -size 1x1 xc:white -set colorspace sRGB -colorspace LAB -format "%[pixel:u.p{0,0}]\n" info:
cielab(99.9985%,50.0038%,49.9931%)

Code: Select all

convert -size 1x1 xc:white -set colorspace sRGB -colorspace LAB txt:
# ImageMagick pixel enumeration: 1,1,65535,cielab
0,0: (99.9985%,0.0030518%,-0.00762951%) #FFFE00020000 cielab(99.9985%,0.0030518%,-0.00762951%)


Is it intentional that txt: is unbiased and the others not?