Received: from mailgate002.isp.belgacom.be (mailgate002.isp.belgacom.be [195.238.6.87])
	by maildelivery021.isp.belgacom.be (Postfix) with ESMTP id 726493C40B9
	for <joris.at.lebbeke@skynet.be>; Fri, 25 Jan 2008 07:07:15 +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 07:07:14 +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 m0P5q9dm009050;
	Fri, 25 Jan 2008 00:52:58 -0500
Received: from mpls-qmqp-04.inet.qwest.net (mpls-qmqp-04.inet.qwest.net
	[63.231.195.115])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id m0P5q5XU009047
	for <tiff@lists.maptools.org>; Fri, 25 Jan 2008 00:52:05 -0500
Received: from mpls-pop-14.inet.qwest.net (mpls-pop-14.inet.qwest.net
	[63.231.195.14])
	by mpls-qmqp-04.inet.qwest.net (Postfix) with QMQP id 36F6E22DDCD
	for <tiff@lists.maptools.org>; Fri, 25 Jan 2008 05:51:53 +0000 (UTC)
Received: from 70-59-61-250.hlrn.qwest.net (HELO ?127.0.0.1?) (70.59.61.250)
	by mpls-pop-14.inet.qwest.net with SMTP; 25 Jan 2008 05:51:52 -0000
Message-ID: <4799790F.50203@qwest.net>
Date: Thu, 24 Jan 2008 22:52:15 -0700
From: Richard Nolde <nrichard8@qwest.net>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
To: tiff@lists.maptools.org
References: <200801241702.m0OH2PYj030716@duke.maptools.org>
In-Reply-To: <200801241702.m0OH2PYj030716@duke.maptools.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Subject: [Tiff] Tiffcrop and tiff2pdf
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.00002a21
X-MSP-STORE: Fri, 25 Jan 2008 07:07:15 +0100
Status:   

  1. Re: TIffcrop might be called tiffextract (Andy Cave)
>> Please, note that tiffcrop is a part of libtiff for quite a some time
>> (and it is part of stable branch of libtiff) and probably already is
>> being used in scripts or called from programs, so it is not harmless to
>> change its name. But everything is possible with a good reason, of
>> course.
>>
>> Best regards,
>> Andrey
> Andrey's point is well taken. I originally proposed that the code that 
> is now tiffcrop should replace tiffcp since it is a superset of the 
> tiffcp utiltity, but Frank Warmerdam rightly noted that tiffcp was far 
> to important to take a change on breaking and certainly no 
> functionality should be removed. I started exploring with a simple 
> crop option and it grew from there. I will try to check out the CVS 
> version soon as I think there may be half a dozen more options that I 
> have added since the 3.8.2 release. A quick check of my source shows 
> options for breaking pages into X columns by Y rows, or various Page 
> sizes, eg Letter, Legal, etc (which are useful for document processing 
> but not meaningful for abstract images unless you just happen to want 
> to print a huge image on sheets of a given size), output orientations 
> of portrait, landscape, auto, ouput margins added to pages rather than 
> subtracted from the original, and the ability to specify new X and Y 
> resolution tags. These were not in the original release so I will have 
> to see if they made it into CVS before the 3.9.0 branch.  One warning 
> to users of the old version.  In order to accomodate the new flags, 
> the case of the old flags has changed in some cases so you will want 
> to check your scripts for compatability before upgrading.
> Anyone is free to provide a symlink with a more appropriate name for 
> their particular installation. Tiffcrop it shall remain.
>
> 3. How to clip an image with Tiffcrop (beppe costagliola)
>
> ----------------------------------------------------------------------
> There are actually two ways to do this. First you must specify your 
> units as pixels with the -U px option. Second specify your reference 
> edge for the measurements -E top. Third, specify the margins you want 
> to subtract (clip/crop/remove) from the original that will not be 
> copied to the new image. The margins MUST be specified in the 
> following order and separate only by commas, top, left, bottom, right. 
> -m 1200,100,1804,876. This should leave an opening 1500 x 500 between 
> the margins but the right and bottom margins are rather a pain to 
> compute and will cause problems if your images vary in size. You can 
> use the flags for a fixed size region, -X 1500 -Y 500 with only the 
> first two margins and tiffcrop will compute the proper region and 
> ignore anything to the right and below the selected region if you only 
> need to select a single region from each image. Note that  This would 
> give you a command line something like this:
tiffcrop -E top -U px -m 1200,100 -X 1500 -Y 500 source.tif destination.tif

Note: Units must come first to override the values found in the tiff 
file. Margins are calculated in the current units, eg actually pixels 
for px, or inches, or centimeters but the later two require that the 
file have a valid resolution for both dimensions. The units in which you 
specify the margins or any dimensions for X and Y, are independent of 
the units that might be stored (or defaulted) in the file. Tiffcrop 
converts between the internal units specified in the file to the type of 
units you specify on the command line before it calculates which pixels 
to select. Any margins not specified are assumed to be zero.

If you want to select more than one region within the cropped borders, 
you can use the -Z option and the regions will be computed AFTER the 
margins are subtracted.

Richard Nolde
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 24 Jan 2008 17:09:23 +0100 (CET)
> From: beppe costagliola <beppecosta@yahoo.it>
> Subject: [Tiff] How to clip an image with Tiffcrop
> To: tiff@lists.maptools.org
> Message-ID: <218112.46229.qm@web26205.mail.ukl.yahoo.com>
> Content-Type: text/plain; charset=iso-8859-1
>
> Tiffcrop seems to work fine but I don't understand the
> parameters that should be passed to.
>
> For example:
>
> I have an image with ImageWidth = 2476 and ImageLength
> = 3504
>
> I would like to extract an area that is at X = 100 and
>
> Y = 1200 giving an image of Width = 1500 and Lenght =
> 500.
>
> Thanks.
>
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
