possible bug reporting LAB values IM 6.8.9.6 Q16 MacOSX

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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

possible bug reporting LAB values IM 6.8.9.6 Q16 MacOSX

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug reporting LAB values IM 6.8.9.6 Q16 MacOSX

Post 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?
Post Reply