Received: from mailgate002.isp.belgacom.be (mailgate002.isp.belgacom.be [195.238.6.87])
	by maildelivery005.isp.belgacom.be (Postfix) with ESMTP id 366EA164005
	for <joris.at.lebbeke@skynet.be>; Fri, 25 Jan 2008 05:53:38 +0100 (CET)
Authentication-Results: in.mx.skynet.be; dkim=neutral (message not signed) header.i=none
Received: from r153.dmsolutions.ca (HELO duke.maptools.org) ([209.217.116.153])
  by in.mx.skynet.be with ESMTP; 25 Jan 2008 05:53:37 +0100
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 m0N00cPg008840;
	Tue, 22 Jan 2008 19:01:37 -0500
Received: from dns2.namehog.net (dns2.namehog.net [213.52.234.203])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id m0N009IS008836
	for <tiff@lists.maptools.org>; Tue, 22 Jan 2008 19:00:10 -0500
Received: from [81.86.57.99] (port=4700 helo=EKAT)
	by dns2.namehog.net with esmtpa (Exim 4.68)
	(envelope-from <andy.cave@hamillroad.com>)
	id 1JHT2N-0006yB-T3; Wed, 23 Jan 2008 00:00:16 +0000
Message-ID: <003901c85d52$e74fd790$c14dfea9@EKAT>
From: "Andy Cave" <andy.cave@hamillroad.com>
To: "Richard Nolde" <nrichard8@qwest.net>, <tiff@lists.maptools.org>
References: <200801221744.m0MHiHlv000505@duke.maptools.org>
	<47966E8B.4040500@qwest.net>
Subject: Re: [Tiff] Re: Tiff Digest, Vol 44, Issue 8, Cropping faxes
Date: Tue, 22 Jan 2008 23:59:57 -0000
Organization: Hamillroad Software
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
	reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-AntiAbuse: This header was added to track abuse,
	please include it with any abuse report
X-AntiAbuse: Primary Hostname - dns2.namehog.net
X-AntiAbuse: Original Domain - lists.maptools.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - hamillroad.com
X-Source: 
X-Source-Args: 
X-Source-Dir: 
Cc: 
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
Reply-To: Andy Cave <andy.cave@hamillroad.com>
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.00002a1d
X-MSP-STORE: Fri, 25 Jan 2008 05:53:38 +0100
Status:   

Hi Richard,

I don't think that tiffcrop will do what Erez wants - I think you mis-read 
his request. He doesn't really want to clip the 'input' image, but extract 
the first X rows from it and append the last X rows from it into a new image 
that is 2X high.

You can do that with libtiff with a bit of programming - if all his images 
are 1 bit he can use the lower level APIs to extract each scanline one at a 
time and using a simple counter write the first X, ignore the next height-2X 
and write the final X to a new file.

Regards,

Andy.

----- Original Message ----- 
From: "Richard Nolde" <nrichard8@qwest.net>
To: <tiff@lists.maptools.org>
Sent: Tuesday, January 22, 2008 10:30 PM
Subject: [Tiff] Re: Tiff Digest, Vol 44, Issue 8, Cropping faxes


> 1. How to clip an image with LibTiff (Erez.Har-Tal@Walgreens.com)
>> Tiffcrop was written to handle just this sort of thing.  It is in the 
>> utilities section of recent releases and/or in CVS.  Read the man page or 
>> type tiffcrop --help to see all the options.
> Richard Nolde, tiffcrop author
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Mon, 21 Jan 2008 13:38:09 -0600
>> From: Erez.Har-Tal@Walgreens.com
>> Subject: [Tiff] How to clip an image with LibTiff
>> To: tiff@lists.maptools.org
>> Message-ID:
>> <OFFC203445.FE96EEE5-ON862573D7.006ADF71-862573D7.006BDDBF@walgreens.com>
>>
>> Content-Type: text/plain; charset=US-ASCII
>>
>>
>> Hello everyone,
>>
>> Please excuse me if I am new to libtiff, so any help would be 
>> appreciated.
>>
>> We deal with faxes in standard mode (204X98 dpi) or fine mode (204X198 
>> dpi)
>> saved with compression of type G3 1D.
>>
>> I need to write a utility that clips the first X rows (pixel) from the 
>> top
>> of the tiff image and last X rows from the bottom of the tiff image. We
>> will save it to a new tiff image with G3 compression in the height of 2X
>> pixels. The first X rows will be the top of the new image and the last X
>> rows will be the bottom of the image. The operation to clip the image,
>> should not alter the image nor do any thing that would damage the image.
>>
>> Is it doable using libtiff on Unix ? Any help and direction will be 
>> highly
>> appreciated. Doable using other open source libraries ?
>>
>> Thanks,
>>
>> ====================
>> Erez Har-Tal
>> Computer Telephony
>> Execution Architecture and Telephony Solutions dept.
>>
> _______________________________________________
> Tiff mailing list: Tiff@lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tiff
> http://www.remotesensing.org/libtiff/ 


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