3

I have to generate a TIFF for print. It is common to use special black tones to get better visual experience. It is cmyk(40%,40%,40%,100%) in my case.

Whatever I do when merging two images together (compositing) the tool "convert" converts my "cmyk(40%,40%,40%,100%)" to "cmyk(0,0,0,255)".

Example:

  • background.tif is an 8 bit CMYK TIF with LZW compression filled with cmyk(40%,40%,40%,100%).
  • textlayer.tif is an 8 bit CMYK TIF with LZW compression with transparent background and yellow text

I call:

/usr/bin/convert -colorspace cmyk \
-compress lzw \
-depth '8' \
-endian msb \
-density 360x360 \
-units PixelsPerInch \
-profile ISOcoated_v2_300_eci.icc \
background.tif textlayer.tif -composite print.tif

When I now check the resulting "print.tif" the most used color is:

% identify -verbose print.tif | grep -A 2 Histogram
  Histogram:
   1674545: (  0,  0,  0,255) #000000FF cmyk(0,0,0,255)
       164: (  0,  0,  1,254) #000001FE cmyk(0,0,1,254)

But thats not the black of my background:

%identify -verbose background.tif  | grep -A 2 Histogram
   Histogram:
    1817895: (102,102,102,255) #666666FF cmyk(102,102,102,255)
   Rendering intent: Perceptual

What's wrong? How can I do it?

Kurt Pfeifle
  • 86,724
  • 23
  • 248
  • 345
t3o
  • 329
  • 1
  • 10

1 Answers1

0

Your command worked for me.

I created two 400x300 pixel source files using your specs:

  1. rich black 40c40m40y100k background
  2. 100y rasterized type block on transparent background with layers preserved

Both files are LZW compressed TIFFs. I don't have ISOcoated_v2_300_eci.icc so I used a standard CYMK profile with your convert command string:

$ convert -colorspace cmyk \
-compress lzw \
-depth '8' \
-endian msb \
-density 360x360 \
-units PixelsPerInch \
-profile ~/Library/ColorSync/Profiles/USWebCoatedSWOP.icc \
rich-black-bg.tif yellow-type-tx.tif \
-composite composite-lzw-profile.tif

Here's the output from identify for all 3 files, using egrep to show filenames and the most common colors (colors with at least 100 pixels in the image). Note that histogram colors in identify's output are sorted by color hex number, not by prevalence in the image. At the bottom you can see the majority of composite image pixels have the correct rich black color:

$ identify -verbose rich-black-bg.tif yellow-type-tx.tif \
composite-lzw-profile.tif | egrep 'Image\:.*\.tif$|Histogram|^\s+\d{3,}\:'

Image: rich-black-bg.tif
  Histogram:
    120000: (102,102,102,255) #666666FF cmyk(102,102,102,255)
Image: yellow-type-tx.tif
  Histogram:
    114603: (  0,  0,  0,  0,  0) #0000000000 cmyka(0,0,0,0,0)
      4584: (  0,  0,255,  0,255) #0000FF00 cmyka(0,0,255,0,1)
       150: (  0,  0,255,  0, 34) #0000FF0022 cmyka(0,0,255,0,0.133333)
       107: (  0,  0,255,  0,153) #0000FF0099 cmyka(0,0,255,0,0.6)
       100: (  0,  0,255,  0,221) #0000FF00DD cmyka(0,0,255,0,0.866667)
Image: composite-lzw-profile.tif
  Histogram:
      4584: (  0,  0,255,  0) #0000FF00 cmyk(0,0,255,0)
       100: ( 14, 14,235, 34) #0E0EEB22 cmyk(14,14,235,34)
       107: ( 41, 41,194,102) #2929C266 cmyk(41,41,194,102)
       150: ( 88, 88,122,221) #58587ADD cmyk(88,88,122,221)
    114603: (102,102,102,255) #666666FF cmyk(102,102,102,255)

I'm using ImageMagick 6.8.9-7 on Mac OS X v10.10.1.

Jamin Kortegard
  • 376
  • 1
  • 5
  • 12