Return-Path: <tiff-bounces@remotesensing.org>
Received: from inmx015.isp.belgacom.be (inmx015.isp.belgacom.be [195.238.2.218])
        by mailst035.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id j1G3eiis027946
        for <joris.at.lebbeke@skynet.be>; Wed, 16 Feb 2005 04:40:44 +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 inmx015.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id j1G3eSPW016239
        for <joris.at.lebbeke@skynet.be>; Wed, 16 Feb 2005 04:40:32 +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 759877B70C9; Tue, 15 Feb 2005 22:40:02 -0500 (EST)
X-Original-To: tiff@remotesensing.org.
Delivered-To: tiff@remotesensing.org
Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.205])
	by xserve.flids.com (Postfix) with ESMTP id AF6BE7B70A6
	for <tiff@remotesensing.org.>; Tue, 15 Feb 2005 22:40:00 -0500 (EST)
Received: by wproxy.gmail.com with SMTP id 36so29880wra
	for <tiff@remotesensing.org.>; Tue, 15 Feb 2005 19:40:00 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com;
	h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references;
	b=nMQ22Aq7yRvdF9OBEd3tWSkC1zzR08ff6LeU7QG+3rfNr8UiALrnuK7E7wcF3r/EnzURPokKoi0zGq4oEcN/94Ubhb1HY4QIpLEY3n08V3klaf8EqNsX0SsfeDh2pi0fLZwpgIzNS0rMz/NCxp+TVFzJKZ6Pmtw54Dfyku8W5DI=
Received: by 10.54.43.28 with SMTP id q28mr98638wrq;
	Tue, 15 Feb 2005 19:39:59 -0800 (PST)
Received: by 10.54.14.8 with HTTP; Tue, 15 Feb 2005 19:39:59 -0800 (PST)
Message-ID: <78bc1718050215193955153417@mail.gmail.com>
Date: Wed, 16 Feb 2005 09:09:59 +0530
From: Priyanshu Sharma <priyanshu.sharma@gmail.com>
To: Joris <joris.at.lebbeke@skynet.be>
Subject: Re: [Tiff] make the libtiff library compression enabled??
In-Reply-To: <000d01c51283$77319100$1faff551@dfgrrxsknr4e>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
References: <78bc171805021401481c1778be@mail.gmail.com>
	<000d01c51283$77319100$1faff551@dfgrrxsknr4e>
Cc: tiff@remotesensing.org
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: Priyanshu Sharma <priyanshu.sharma@gmail.com>
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: 97fecc10a35c5eba271ab915116bde15

Thanx Joris ,

Ur funda of using raw strips has really worked and now i can
sucessfully extract the pages from a compressed image.

As i am a learner here and this is a new domain for me, Ur advised was
of great help.
As told by u i have read the TIFF6.0 document although not completely
but i feel i have understood the tiff architecture.

Now next thing i want to do is to append a page of other file to a new file.
As far as i can see i just have to set the offset value for the next
IFD to the last four bytes of the previous IFD and then can call my
extract page vala module.

Is my approach correct, do i have any thing in LibTiff to do this ?
can i append data into a TIFF file using libtif.

plz help,

with regards
priyanshu
Bits,Pilani 


On Mon, 14 Feb 2005 11:53:46 +0100, Joris <joris.at.lebbeke@skynet.be> wrote:
> 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
