Received: from inav036.isp.belgacom.be (localhost.localdomain [127.0.0.1])
	by inav036.isp.belgacom.be (Postfix) with ESMTP id DD61EB2FBD
	for <joris.at.lebbeke@skynet.be>; Mon,  5 Feb 2007 20:19:04 +0100 (CET)
Received: from infbas005.isp.belgacom.be (infbas005.isp.belgacom.be [195.238.5.185])
	by inav036.isp.belgacom.be (Postfix) with ESMTP id D1382B2FC2
	for <joris.at.lebbeke@skynet.be>; Mon,  5 Feb 2007 20:19:04 +0100 (CET)
Received: from inas013.isp.belgacom.be (inas013.isp.belgacom.be [195.238.4.241])
        by infbas005.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-2.32) with ESMTP id l15JJ2Yh010402
        for <joris.at.lebbeke@skynet.be>; Mon, 5 Feb 2007 20:19:02 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx014.isp.belgacom.be (inmx014.isp.belgacom.be [195.238.4.217])
        by inas013.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AS-2.03) with ESMTP id l15JIqn0031794
        for <joris.at.lebbeke@skynet.be>; Mon, 5 Feb 2007 20:18:53 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx014.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-2.32) with ESMTP id l15JIkdq019460
        for <joris.at.lebbeke@skynet.be>; Mon, 5 Feb 2007 20:18:47 +0100
        (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 l15J8s4b029355;
	Mon, 5 Feb 2007 14:09:19 -0500
Received: from outmx001.isp.belgacom.be (outmx001.isp.belgacom.be
	[195.238.5.51])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l15J8qvQ029351
	for <tiff@lists.maptools.org>; Mon, 5 Feb 2007 14:08:53 -0500
Received: from outmx001.isp.belgacom.be (localhost [127.0.0.1])
	by outmx001.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22)
	with ESMTP id l15J8gBK002857
	for <tiff@lists.maptools.org>; Mon, 5 Feb 2007 20:08:43 +0100
	(envelope-from <joris.at.lebbeke@skynet.be>)
Received: from AWareCore2Duo (32.204-64-87.adsl-dyn.isp.belgacom.be
	[87.64.204.32])
	by outmx001.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22)
	with SMTP id l15J8bVP002804; Mon, 5 Feb 2007 20:08:37 +0100
	(envelope-from <joris.at.lebbeke@skynet.be>)
Message-ID: <001c01c74959$04112d20$777dfea9@AWareCore2Duo>
From: "Joris" <joris.at.lebbeke@skynet.be>
To: "Steven Lim" <slch2020@gmail.com>, <tiff@lists.maptools.org>
References: <c6b4beb0702041928y480646ecgf81f67df93cce491@mail.gmail.com>
Subject: Re: [Tiff] Request help On OJPEG Compression In Libtiff
Date: Mon, 5 Feb 2007 19:49:21 +0100
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
	reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
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.0000209f
X-MSP-STORE: Mon, 05 Feb 2007 20:19:05 +0100
Status:   

Steven,

Steven Lim wrote:
> Compression? The version of libtiff i grab it from CVS and it's
> said no required hack on libjpeg, and i try just to use it by
> calling TIFFSetField(tiffout, TIFFTAG_COMPRESSION,
> COMPRESSION_OJPEG), and this seem not correct.

I misunderstood you before, or either you misunderstand TIFF decompression 
using LibTiff.

There is support for decompressing most flavours of bad old OJPEG. There is 
no support for compressing with this scheme. There's plenty of good reason 
for that decision, mostly being that the original OJPEG spec is totally 
flawed and breaks TIFF, and furthermore is ambigious, which lead to many 
different mutually incompatible implementations by vendors. These days, 
OJPEG is only written by either a) vendors who have an interest in locking 
their users even when the latter try and use an open file format, and b) 
vendors who have a need to be compatible with the a).

If you need JPEG compression in TIFF, you need to look into new-style JPEG 
compression.

If you need OJPEG decompression, you don't need to set the 
TIFFTAG_COMPRESSION field. Rather, consult the LibTiff docs, namely 
preferably the part on how to use the RGBAImage interface, as that'll take 
care of desubsampling issues for you.


Best regards,

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/
