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.)
Channels M and Y
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Channels M and Y
snibgo's IM pages: im.snibgo.com
Re: Channels M and Y
We can reproduce the problem you posted and have a patch in ImageMagick 6.8.9-2 Beta, available by sometime tomorrow. Thanks.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Channels M and Y
Which command has the values swapped?
cmyk(0%,4.167%,41.67%,5.882%)
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%)
Code: Select all
convert xc:khaki -precision 4 -colorspace cmyk -format "%[pixel:p{0,0}]" info:
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:
__________
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%)