
Thread
2008.06.19 19:05 "Re: [Tiff] Re: Conversion from CYMK Tiff to RGB Tiff", by Bob Friesenhahn
On Thu, 19 Jun 2008, Mitesh wrote:
>
> Is there a way to know if it is a CYMK Tiff file or an RGB Tiff file?
Yes. CYMK Tiffs use a planar configuration of "separated".
> Also, can we convert from CYMK Tiff to RGB Tiff through "libtiff"?
Not directly. I suggest taking a look at Little CMS ("lcms") at
http://www.littlecms.com/. There is a provided utility which supports
using CMS profiles with libtiff so you can use a profile describing
your variant of CMYK and use it to convert to a desired RGB.
Also, there are several image processing packages (e.g.
GraphicsMagick) which use lcms to do this work but with more power and
more convenient interfaces.
Here is tiffinfo output for a CMYK TIFF:
% tiffinfo crap.tiff
TIFF Directory at offset 0x5f4068 (6242408)
Image Width: 1530 Image Length: 1020
Resolution: 255, 255 pixels/inch
Bits/Sample: 8
Sample Format: unsigned integer
Compression Scheme: None
Photometric Interpretation: separated
Samples/Pixel: 4
Rows/Strip: 1
Planar Configuration: single image plane
Page Number: 0-1
DocumentName: crap.tiff
Software: GraphicsMagick 1.3 unreleased Q16 http://www.GraphicsMagick.org/
Ink Set: CMYK
Photoshop Data: <present>, 6594 bytes
ICC Profile: <present>, 3144 bytes
Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/