Hi, when i convert an image with "-depth 8", the result was ''# ImageMagick pixel enumeration: 500,500,65535,srgb".
[cmd] convert artwork.png -depth 8 -colorspace srgb -alpha off txt:-
[output] # ImageMagick pixel enumeration: 500,500,65535,srgb
Platform:
Macbook Pro
System Version: macOS 10.14.3 (18D109)
Kernel Version: Darwin 18.2.0
Imagemagick Version: ImageMagick 6.9.10-27 Q16 x86_64 2019-02-15 https://imagemagick.org
===============
Howerver, the result was right in my docker container.
[cmd] convert artwork.png -depth 8 -colorspace srgb -alpha off txt:-
[output] # ImageMagick pixel enumeration: 500,500,255,srgb
Platform:
VERSION="Ubuntu 16.04.5 LTS (Xenial Xerus)"
Imagemagick Version: ImageMagick 6.8.9-9 Q16 x86_64 2018-09-28 http://www.imagemagick.org
Can anyone help me with this problem?
ps.
image info:
[cmd] identify artwork.png
[output] artwork.png PNG 500x500 500x500+0+0 8-bit sRGB 218890B 0.000u 0:00.000
convert with -depth8, but the output is # ImageMagick pixel enumeration: 500,500,65535,srgb
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert with -depth8,but output was # ImageMagick pixel enumeration: 500,500,65535,srgb
ImageMagick txt: reports values in the Quantum depth of your install, not according to your depth. So if you are on Q16, it will report 65535. If on Q8, it will report 255
On my Q16 ImageMagick,
However, if the last value is not a color name it will be reported as srgb(r,g,b) with r,g,b in range 0 to 255.
On my Q16 ImageMagick,
convert logo: -depth 8 txt:
# ImageMagick pixel enumeration: 640,480,65535,srgb
0,0: (65535,65535,65535) #FFFFFF white
...
However, if the last value is not a color name it will be reported as srgb(r,g,b) with r,g,b in range 0 to 255.
Re: convert with -depth8,but output was # ImageMagick pixel enumeration: 500,500,65535,srgb
So, the numbers in the first parenthesis is dependent on the version of ImageMagick(Q8 or Q16), and the last value is dependent on the flag of -depth?fmw42 wrote: ↑2019-04-03T10:00:09-07:00 ImageMagick txt: reports values in the Quantum depth of your install, not according to your depth. So if you are on Q16, it will report 65535. If on Q8, it will report 255
On my Q16 ImageMagick,
convert logo: -depth 8 txt:
# ImageMagick pixel enumeration: 640,480,65535,srgb
0,0: (65535,65535,65535) #FFFFFF white
...
However, if the last value is not a color name it will be reported as srgb(r,g,b) with r,g,b in range 0 to 255.
eg.
# ImageMagick pixel enumeration: 640,480,65535,srgb
0,0: (65535,65535,65535) #FFFFFF srgb(255,255,255)
...
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert with -depth8, but the output is # ImageMagick pixel enumeration: 500,500,65535,srgb
The last value should always be in the range 0-255 if not a color name.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert with -depth8, but the output is # ImageMagick pixel enumeration: 500,500,65535,srgb
There are exceptions such as when hue is involved and then you will get % values.The last value should always be in the range 0-255 if not a color name.
Code: Select all
convert xc:red -colorspace hsl txt:
0,0: (0,65535,32768) #0000FFFF8000 hsl(0,100%,50%)