Channels M and Y

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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Channels M and Y

Post by snibgo »

Arising from thread viewtopic.php?f=1&t=25600.

Channels M and Y seem to be reversed in "-format".

convert xc:cmyk(10%,20%,30%,40%) -colorspace CMYK -precision 9 -format "%[fx:100*p{0,0}.c]\%,%[fx:100*p{0,0}.m]\%,%[fx:100*p{0,0}.y]\%,%[fx:100*p{0,0}.k]\%" info:

10.000763%,30.000763%,20%,40%

(Tested with IM v6.8.9-0 on Windows 8.1.)
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Channels M and Y

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.8.9-2 Beta, available by sometime tomorrow. Thanks.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Channels M and Y

Post by fmw42 »

Which command has the values swapped?

Code: Select all

convert xc:khaki -precision 4 -colorspace cmyk -format "%[pixel:p{0,0}]" info:
cmyk(0%,4.167%,41.67%,5.882%)

Code: Select all

convert \
xc:khaki -colorspace CMYK \
-precision 4 \
-format "cmyk(%[fx:100*c]\%,%[fx:100*m]\%,%[fx:100*y]\%,%[fx:100*k]\%)" \
info:
cmyk(0%,41.67%,4.167%,5.882%)

__________

P.S. Never mind, this explains it -- the bottom one has the magenta value in the yellow position


convert xc:magenta -precision 4 -colorspace cmyk -format "%[pixel:p{0,0}]" info:
cmyk(0,255,0,0)

convert \
xc:magenta -colorspace CMYK \
-precision 4 \
-format "cmyk(%[fx:100*c]\%,%[fx:100*m]\%,%[fx:100*y]\%,%[fx:100*k]\%)" \
info:
cmyk(0%,0%,100%,0%)
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Channels M and Y

Post by snibgo »

The bottom one.
snibgo's IM pages: im.snibgo.com
Post Reply