Return-Path: <tiff-bounces@lists.maptools.org>
Delivered-To: info@awaresystems.be
Received: (qmail 31966 invoked from network); 19 Jun 2008 19:10:31 -0000
Received: from cliffy.telenet-ops.be ([195.130.136.2])
          (envelope-sender <tiff-bounces@lists.maptools.org>)
          by angelia.telenet-ops.be (qmail-ldap-1.03) with SMTP
          for <info@awaresystems.be>; 19 Jun 2008 19:10:31 -0000
Received: from waldo.telenet-ops.be (waldo.telenet-ops.be [195.130.136.10])
	by cliffy.telenet-ops.be (8.13.1/8.13.1) with ESMTP id m5JJAVnW017047
	for <info@awaresystems.be>; Thu, 19 Jun 2008 21:10:31 +0200
Received: from localhost (localhost.localdomain [127.0.0.1])
	by waldo.telenet-ops.be (Postfix) with SMTP id 357B21C006
	for <info@awaresystems.be>; Thu, 19 Jun 2008 21:10:31 +0200 (CEST)
Received: from ladon.telenet-ops.be (ladon.telenet-ops.be [195.130.132.50])
	by waldo.telenet-ops.be (Postfix) with ESMTP id 2F8FE1C002
	for <info@awaresystems.be>; Thu, 19 Jun 2008 21:10:31 +0200 (CEST)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153])
	by ladon.telenet-ops.be (Postfix) with ESMTP id 5FC19312788
	for <info@awaresystems.be>; Thu, 19 Jun 2008 21:10:30 +0200 (CEST)
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id m5JJ5eLs013409;
	Thu, 19 Jun 2008 15:08:23 -0400
Received: from scooby.simplesystems.org (scooby.simplesystems.org
	[65.66.246.67])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id m5JJ5cJP013405
	for <tiff@lists.maptools.org>; Thu, 19 Jun 2008 15:05:38 -0400
Received: from freddy.simplesystems.org (freddy.simplesystems.org
	[65.66.246.65])
	by scooby.simplesystems.org (8.12.10+Sun/8.12.10) with ESMTP id
	m5JJ5XCI014729; Thu, 19 Jun 2008 14:05:35 -0500 (CDT)
Date: Thu, 19 Jun 2008 14:05:33 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Mitesh <shailaj@mail.com.np>
Subject: Re: [Tiff] Re: Conversion from CYMK Tiff to RGB Tiff
In-Reply-To: <IEEAIAMGFNJJGCEFPHMOAEFMCDAA.shailaj@mail.com.np>
Message-ID: <Pine.SOC.4.64.0806191357390.1056@freddy.simplesystems.org>
References: <IEEAIAMGFNJJGCEFPHMOAEFMCDAA.shailaj@mail.com.np>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: tiff@lists.maptools.org
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-SpamCatcher-Score: 10 [X]

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/

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
