Page 1 of 1

Channels M and Y

Posted: 2014-05-26T05:49:47-07:00
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.)

Re: Channels M and Y

Posted: 2014-05-26T09:15:49-07:00
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.

Re: Channels M and Y

Posted: 2014-05-26T16:44:08-07:00
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%)

Re: Channels M and Y

Posted: 2014-05-26T16:57:17-07:00
by snibgo
The bottom one.