possible bug in txt output for colors IM 6.5.7-0 Q16

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 in txt output for colors IM 6.5.7-0 Q16

Post by fmw42 »

IM 6.5.7-0 Q16 Mac OSX Tiger

1) I believe there is an error in the computation of the hsb(...) hue value in txt: output.

convert -size 1x1 xc:blue -colorspace hsb txt:
# ImageMagick pixel enumeration: 1,1,65535,hsb
0,0: (43690,65535,65535) #AAAAFFFFFFFF hsb(170,255,255)

Hue=360*43690/65535=240=360*2/3 for blue

The value of 170=255*2/3 is not correct for blue

2) When getting the same color as hsl, the hsl(...) entry is in percent. Perhaps both hsb and hsl should be consistent on use of percent or raw values.

convert -size 1x1 xc:blue -colorspace hsl txt:
# ImageMagick pixel enumeration: 1,1,65535,hsl
0,0: (43690,65535,32768) #AAAAFFFF8000 hsl(66.6667%,100%,50.0008%)

The value 66.6667%=2/3 so is correct for blue
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: possible bug in txt output for colors IM 6.5.7-0 Q16

Post by magick »

We can reproduce the problem you posted and will have a patch available in the Subversion trunk by sometime tomorrow. Thanks.
Post Reply