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 j1B5cGxc030942
        for <joris.at.lebbeke@skynet.be>; Fri, 11 Feb 2005 06:38:16 +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 j1B5c2Wo007179
        for <joris.at.lebbeke@skynet.be>; Fri, 11 Feb 2005 06:38:04 +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 C865C79B32B; Fri, 11 Feb 2005 00:37:46 -0500 (EST)
X-Original-To: tiff@remotesensing.org.
Delivered-To: tiff@remotesensing.org
Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.199])
	by xserve.flids.com (Postfix) with ESMTP id 3AF0379B308
	for <tiff@remotesensing.org.>; Fri, 11 Feb 2005 00:37:44 -0500 (EST)
Received: by wproxy.gmail.com with SMTP id 36so1816075wra
	for <tiff@remotesensing.org.>; Thu, 10 Feb 2005 21:37:43 -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:mime-version:content-type:content-transfer-encoding;
	b=NR706Q21G8jQ7cZHA+z7j2hUR7FqBqEu6z74NwHgMyAzw8LMOz/3ulV6lsBpWgCxd5UuUtGjsnxJKpBNQFYiUcLrkgvRFkVHHqbmNkARK4hUUfpE+ja8/4Hq0fOKnSXR2KPujkkJc298VLGgaO5JrbZQJK56ShcWuDmOduLrMUg=
Received: by 10.54.56.11 with SMTP id e11mr154569wra;
	Thu, 10 Feb 2005 21:37:42 -0800 (PST)
Received: by 10.54.14.8 with HTTP; Thu, 10 Feb 2005 21:37:42 -0800 (PST)
Message-ID: <78bc171805021021373350da35@mail.gmail.com>
Date: Fri, 11 Feb 2005 11:07:42 +0530
From: Priyanshu Sharma <priyanshu.sharma@gmail.com>
To: tiff@remotesensing.org
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Cc: 
Subject: [Tiff] facing problems with writing compressed tiff image strips.
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: 59ad524ed99d724d66ab73f044af4ebf

Hi all,

I am new to the community as this is my first post, and recently i
have started my work on TIFF images. Using the libtiff library version
3.6.1 i am trying to read the compressed data strip( ie using
TIFFReadEncodedStrip() in my code).

i am giving my logic below.

NoOfStrips = TIFFNumberOfStrips(fp_TIFF_read);
buf size i am taking as the StripByteCount for the respective strips.
for (int line =0;line<NoOfStrips;line++)
	{
		buf = (char*) malloc(bufSize  * sizeof(char));

		
		if(TIFFReadEncodedStrip(fp_TIFF_read,line,buf, bufSize) < 0)
		{
			printf("\n\n error in reading the file\n\n");
			res = false;
			break;
		}

		if(TIFFWriteEncodedStrip(fp_TIFF_write,line,buf, bufSize) < 0)
		{
			printf("\nerror while writing TIFF file");
			res = false;
			break;
		}
      
      free(buf);

	}

ideally this code should copy the data strips into another tiff file
where i have already written the respective tags.

it is not working in this case. i am unable to figure out my mistake.
Can anyone help me in this regard.

Thanx in advance
Priyanshu
BITS, Pilani
_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff
