How to produce plain black cmyk
Posted: 2013-01-24T02:49:00-07:00
Dear all,
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
produces image, where the gray is composed of CMY, e.g. cmyk(251,251,251,0)...
So I tried to copy the Y channel to K using -color-matrix:
But imagemagick seems to completely ignore the -color-matrix in this case
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
(the result is inverted, but it can be fixed easily) Unfortunately, this doesn't work for black. Using
Produces just plain white image.
Rather surprisingly, the only command to produce plain black tiff was
but the resulting cmyk jpg is blurred and unusable probably due to subsampling problems.
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
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