possible bug -depth 8 histogram info

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

possible bug -depth 8 histogram info

Post by fmw42 »

The format of the information returned from a histogram seems to have changed and no longer respects the -depth argument. It used to show raw gray level values in the range defined by -depth. This change occurred between IM 6.9.10.82 and 6.9.10.83


im691082 convert rose: -depth 8 -format "%c" histogram:info: | head -n 10
1: ( 35, 47, 37) #232F25 srgb(35,47,37)
1: ( 37, 43, 33) #252B21 srgb(37,43,33)
1: ( 39, 39, 45) #27272D srgb(39,39,45)
1: ( 39, 43, 47) #272B2F srgb(39,43,47)
1: ( 39, 50, 30) #27321E srgb(39,50,30)
1: ( 39, 50, 37) #273225 srgb(39,50,37)
1: ( 40, 39, 40) #282728 srgb(40,39,40)
1: ( 40, 46, 40) #282E28 srgb(40,46,40)
1: ( 41, 36, 34) #292422 srgb(41,36,34)
1: ( 41, 43, 44) #292B2C srgb(41,43,44)

im691083 convert rose: -depth 8 -format "%c" histogram:info: | head -n 10
1: (8995,12079,9509) #232F25 srgb(35,47,37)
1: (9509,11051,8481) #252B21 srgb(37,43,33)
1: (10023,10023,11565) #27272D srgb(39,39,45)
1: (10023,11051,12079) #272B2F srgb(39,43,47)
1: (10023,12850,7710) #27321E srgb(39,50,30)
1: (10023,12850,9509) #273225 srgb(39,50,37)
1: (10280,10023,10280) #282728 srgb(40,39,40)
1: (10280,11822,10280) #282E28 srgb(40,46,40)
1: (10537,9252,8738) #292422 srgb(41,36,34)
1: (10537,11051,11308) #292B2C srgb(41,43,44)

User avatar
magick
Site Admin
Posts: 11215
Joined: 2003-05-31T11:32:55-07:00

Re: possible bug -depth 8 histogram info

Post by magick »

Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ https://www.imagemagick.org/download/beta/ by sometime tomorrow.

Post Reply