Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas006.isp.belgacom.be (localhost [127.0.0.1])
        by inav002.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id j89Na8qv010464
        for <joris.at.lebbeke@skynet.be>; Sat, 10 Sep 2005 01:36:08 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx005.isp.belgacom.be (inmx005.isp.belgacom.be [195.238.3.148])
        by inas006.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id j89NZwun022997
        for <joris.at.lebbeke@skynet.be>; Sat, 10 Sep 2005 01:35:59 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx005.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id j89NZnAh014663
        for <joris.at.lebbeke@skynet.be>; Sat, 10 Sep 2005 01:35:50 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
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 j89NUMcO022538;
	Fri, 9 Sep 2005 19:30:39 -0400
Received: from outmx009.isp.belgacom.be (outmx009.isp.belgacom.be
	[195.238.3.4])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id j89NUKwi022535
	for <tiff@lists.maptools.org>; Fri, 9 Sep 2005 19:30:20 -0400
Received: from outmx009.isp.belgacom.be (localhost [127.0.0.1])
	by outmx009.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with
	ESMTP id j89NUFL3008649
	for <tiff@lists.maptools.org>; Sat, 10 Sep 2005 01:30:15 +0200
	(envelope-from <joris.at.lebbeke@skynet.be>)
Received: from dfgrrxsknr4e (246-182.246.81.adsl.skynet.be [81.246.182.246])
	by outmx009.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with SMTP
	id j89NUAQH008610; Sat, 10 Sep 2005 01:30:10 +0200
	(envelope-from <joris.at.lebbeke@skynet.be>)
Message-ID: <002201c5b596$773aef00$f6b6f651@dfgrrxsknr4e>
From: "Joris" <joris.at.lebbeke@skynet.be>
To: "TIFF mailing list" <tiff@lists.maptools.org>,
        "Bob Friesenhahn" <bfriesen@simple.dallas.tx.us>
References: <000201c5b4a9$545c3950$4500a8c0@MOJO><Pine.SOC.4.60.0509081756210.13765@blade.simplesystems.org><001f01c5b521$57ea0570$58a0f551@dfgrrxsknr4e>
	<Pine.SOC.4.60.0509090951110.13765@blade.simplesystems.org>
Subject: Re: [Tiff] creating JPEG file 
Date: Sat, 10 Sep 2005 01:30:28 +0200
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Cc: 
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-UIDL: 000000000023ceae.00000bea
X-MSP-STORE: Sat, 10 Sep 2005 01:36:15 --21-99
Status:   

Bob,

Bob Friesenhahn wrote:
> GraphicsMagick is doing something a bit odd though since it uses
>
>    (void) TIFFSetField(tiff,TIFFTAG_JPEGCOLORMODE,JPEGCOLORMODE_RGB);
>
> The only other choice appears to be JPEGCOLORMODE_RAW.  Maybe
> JPEGCOLORMODE_RAW should be used for CMYK?

As you know, I'm not much of a LibTiff expert. But here's my two cents
anyway.

I think TIFFTAG_JPEGCOLORMODE is a so-called 'pseudo-tag'. That is, a
tag that doesn't end up in the TIFF file, nor should end up in there,
but simply serves the purpose of passing through optional settings and
stuff to the compression codec. In this case, the compression codec is
LibJpeg, and TIFFTAG_JPEGCOLORMODE signals whether you want LibJpeg to
do converstion from/to RGB, or handle this the normal way (outside of
the compression codec, that is).

So, what you want to use should depend on your encapsulating design. I
would expect an extensive encapsulating app like yours takes care of all
convertion from/to YCbCr and CMYK and all. It would have to, anyway,
since these color modes can be used with any compression scheme, not
just with JPEG compression. So... that's when I guess there's not ever
any good need for JPEGCOLORMODE_RGB, and that it only serves the purpose
of complicating things by making resulting/needed color spaces
compression scheme dependently related to the color space specified in
the Photometric tags and all... But obviously, I'm missing something,
since I've made this point before and nobody seems to agree.

Like I said, I'm not much of a LibTiff expert. And whether this is
related to LibTiff adding the YCbCrSubSampling tag or not, I couldn't
even hope to guess. Sorry.


Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be/
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html

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