Short question: how to produce a plain black CMYK grayscale image in ImageMagick?
Long story: I have a grayscale image and I want to convert it to a plain black CMYK file i.e. only black channel is nonzero. However, using
Code: Select all
convert 1219-1054.jpg -colorspace CMYK 0103_cmyk_matrix.tif
So I tried to copy the Y channel to K using -color-matrix:
Code: Select all
convert 1219-1054.jpg -colorspace CMYK -color-matrix \
" 0.0 0.0 0.0 0.0, 0.0, 0. \
0.0 0.0 0.0 0.0, 0.0, 0. \
0.0 0.0 0.0 0.0, 0.0, 0. \
0.0 0.0 1.0 0.0, 0.0, 0.0 \
0.0 0.0 0.0 0.0, 1.0, 0.0 \
0.0 0.0 0.0 0.0, 0.0, 1.0" -colorspace CMYK 0103_cmyk_matrix.tif
However, converting the image first to CMYK tiff and the using then color matrix, I can manipulate CMY channels and copy for example the Cyan to Yellow channel like this
Code: Select all
convert 1219-1054.jpg -colorspace CMYK 0103-cmyk-IM.tif
convert 0103-cmyk-IM.tif -colorspace CMYK -color-matrix \
" 0.0 0.0 0.0 0.0, 0.0, 0. \
0.0 0.0 0.0 0.0, 0.0, 0. \
1.0 0.0 0.0 0.0, 0.0, 0. \
0.0 0.0 0.0 0.0, 0.0, 0.0 \
0.0 0.0 0.0 0.0, 1.0, 0.0 \
0.0 0.0 0.0 0.0, 0.0, 1.0" -colorspace CMYK 0103_cmyk_matrix.tif
Code: Select all
convert 1219-1054.jpg -colorspace CMYK 0103-cmyk-IM.tif
convert 0103-cmyk-IM.tif -colorspace CMYK -color-matrix \
" 0.0 0.0 0.0 0.0, 0.0, 0. \
0.0 0.0 0.0 0.0, 0.0, 0. \
0.0 0.0 0.0 0.0, 0.0, 0. \
1.0 0.0 0.0 0.0, 0.0, 0.0 \
0.0 0.0 0.0 0.0, 1.0, 0.0 \
0.0 0.0 0.0 0.0, 0.0, 1.0" -colorspace CMYK 0103_cmyk_matrix.tif
Rather surprisingly, the only command to produce plain black tiff was
Code: Select all
convert 1219-1054.jpg -colorspace CMYK 0103-cmyk-IM.jpg
So, is there some reliable way to produce a plain black cmyk file with imagemagick?
A sample file can be downloaded from
https://www.dropbox.com/s/ys38p8sa74799fq/1219-1054.jpg
Thanks in advance for any help
Stepan