Return-Path: <tiff-bounces@remotesensing.org>
Received: from inmx006.isp.belgacom.be (inmx006.isp.belgacom.be [195.238.2.106])
        by mailst035.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id j1EAsEBD006806
        for <joris.at.lebbeke@skynet.be>; Mon, 14 Feb 2005 11:54:14 +0100
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from xserve.flids.com (adsl-065-083-169-202.sip.mco.bellsouth.net [65.83.169.202])
        by inmx006.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id j1EAs2sq026439
        for <joris.at.lebbeke@skynet.be>; Mon, 14 Feb 2005 11:54:03 +0100
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from adsl-065-083-169-202.sip.mco.bellsouth.net (localhost [127.0.0.1])
	by xserve.flids.com (Postfix) with ESMTP
	id 2DA9D7AB346; Mon, 14 Feb 2005 05:53:46 -0500 (EST)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from outmx018.isp.belgacom.be (outmx018.isp.belgacom.be
	[195.238.2.117])
	by xserve.flids.com (Postfix) with ESMTP id 115457AB323
	for <tiff@remotesensing.org>; Mon, 14 Feb 2005 05:53:44 -0500 (EST)
Received: from outmx018.isp.belgacom.be (localhost [127.0.0.1])
	by outmx018.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with
	ESMTP id j1EArd6Q006841
	for <tiff@remotesensing.org>; Mon, 14 Feb 2005 11:53:39 +0100
	(envelope-from <joris.at.lebbeke@skynet.be>)
Received: from dfgrrxsknr4e (31-175.245.81.adsl.skynet.be [81.245.175.31])
	by outmx018.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with SMTP
	id j1EArYnV006806; Mon, 14 Feb 2005 11:53:34 +0100
	(envelope-from <joris.at.lebbeke@skynet.be>)
Message-ID: <000d01c51283$77319100$1faff551@dfgrrxsknr4e>
From: "Joris" <joris.at.lebbeke@skynet.be>
To: "Priyanshu Sharma" <priyanshu.sharma@gmail.com>, <tiff@remotesensing.org>
References: <78bc171805021401481c1778be@mail.gmail.com>
Subject: Re: [Tiff] make the libtiff library compression enabled??
Date: Mon, 14 Feb 2005 11:53:46 +0100
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.1478
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478
Cc: 
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: TIFF and libtiff discussion  <tiff.remotesensing.org>
List-Unsubscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://xserve.flids.com/pipermail/tiff>
List-Post: <mailto:tiff@remotesensing.org>
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Subscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
Sender: tiff-bounces@remotesensing.org
Errors-To: tiff-bounces@remotesensing.org
X-UIDL: 761b03fadad506aadca3668129c7677e

Priyanshu,

> i guess i have not enabled the compression tag while building the
> libtiff library. can any one tell me how i can do that i.e. what all
> flags i have to specify under the head EXTRAFLAGS label.

I doubt your problem is related to that. Judging from your previous post, it is
more probable that your problem is related to too small a buffer size.

> > buf size i am taking as the StripByteCount for the respective strips.

Yep... When dealing with compressed images, the StripByteCount is usually going
to be smaller then the size of the decompressed strip. TIFFXxxEncodedStrip deals
with *decompressed* strips. Thus, you have yourself a buffer overflow.

Use TIFFXxxRawStrip if you're feeling adventurous and are confident that
compression method and options in source and dest TIFF match. This will enable
you to copy the compressed strips, without any decompression and recompression.
Or either use something like TIFFStripSize to calculate the uncompressed strip
size.

Also, you might come across problems due to blindly copying tags, as opposed to
selectively copying them, if that is what you're doing. Make sure your code
copies only the tags it understands. If not, you could for instance be copying a
tag with a LONG value that actually points to an IFD that you're not copying,
for instance, causing major trouble for a subsequent reader that does know and
use the value of the tag.


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@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff
