Page 1 of 1

possible bug verbose stats for -colorspace gray iM 6.4.4.-4

Posted: 2008-10-11T17:32:45-07:00
by fmw42
IM 6.4..4-4 Q16 Mac OSX Tiger

I may be remembering wrong, but for grayscale images, the histogram, as I recall, seemed to just display min, max, mean and std once only for channel statistics "Gray". Now it seems to display statistics for Red, Green and Blue even when the type is grayscale. Seems like the colorspace is still RGB and not Gray, now, even when specifying -colorspace Gray.

Basically, it seems like -colorspace Gray is not being honored in the verbose info.

Has this changed in 6.4.4.-4 or a recent version? Seems like at one time it was just showing Gray stats?

convert rose: -colorspace gray rose_gray.png
identify -verbose rose_gray.png

...
Base type: Grayscale
Endianess: Undefined
Colorspace: RGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
Channel statistics:
red:
min: 37 (0.145098)
max: 255 (1)
mean: 105.139 (0.41231)
standard deviation: 47.3905 (0.185845)
green:
min: 37 (0.145098)
max: 255 (1)
mean: 105.139 (0.41231)
standard deviation: 47.3905 (0.185845)
blue:
min: 37 (0.145098)
max: 255 (1)
mean: 105.139 (0.41231)
standard deviation: 47.3905 (0.185845)


Likewise:
convert rose: -channel red -separate -colorspace gray rose_red.png
identify -verbose rose_red.png

...
Type: Grayscale
Base type: Grayscale
Endianess: Undefined
Colorspace: RGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
Channel statistics:
red:
min: 35 (0.137255)
max: 255 (1)
mean: 145.712 (0.57142)
standard deviation: 69.2953 (0.271746)
green:
min: 35 (0.137255)
max: 255 (1)
mean: 145.712 (0.57142)
standard deviation: 69.2953 (0.271746)
blue:
min: 35 (0.137255)
max: 255 (1)
mean: 145.712 (0.57142)
standard deviation: 69.2953 (0.271746)


Neither seem to show colorspace as Gray (but as RGB)! Are either of these issues a bug or are they intended changes or am I just not clear what is to be displayed here?

Re: possible bug verbose stats for -colorspace gray iM 6.4.4.-4

Posted: 2008-10-12T15:55:19-07:00
by magick
We have a patch for the problem you reported. It will be available by sometime tomorrow in the Subversion trunk. Thanks.

Re: possible bug verbose stats for -colorspace gray iM 6.4.4.-4

Posted: 2008-11-05T18:35:35-07:00
by anthony
More than likely the PNG image itself is RGB and not gray.
Not certain what the patch 'Magick' is adding will do.