AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
January 2008

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2008.01.21 19:38 "How to clip an image with LibTiff", by <erez.har-tal@walgreens.com>
2008.01.22 10:24 "Re: How to clip an image with LibTiff", by Gerben Vos
2008.01.22 10:38 "Q: Change single pixels in a tiled Tiffs", by Timur Ametov
2008.01.23 20:18 "Change single pixels in a tiled Tiff-image", by Timur Ametov
2008.01.24 12:14 "Re: Change single pixels in a tiled Tiff-image", by Andrey Kiselev
2008.01.24 12:35 "Re: Change single pixels in a tiled Tiff-image", by Andy Cave
2008.01.22 20:39 "Re: How to clip an image with LibTiff", by Andrey Kiselev
2008.01.24 16:09 "How to clip an image with Tiffcrop", by Beppe Costagliola
2008.01.22 22:30 "Re: Tiff Digest, Vol 44, Issue 8, Cropping faxes", by Richard Nolde
2008.01.22 23:59 "Re: Tiff Digest, Vol 44, Issue 8, Cropping faxes", by Andy Cave
2008.01.23 00:39 "Tiff Digest, Vol 44, Issue 8, Cropping faxes", by Richard Nolde
2008.01.23 10:51 "Re: Tiff Digest, Vol 44, Issue 8, Cropping faxes", by Andy Cave
2008.01.24 05:23 "TIffcrop might be called tiffextract", by Richard Nolde
2008.01.24 12:07 "Re: TIffcrop might be called tiffextract", by Andrey Kiselev
2008.01.24 12:32 "Re: TIffcrop might be called tiffextract", by Andy Cave
2008.01.25 05:52 "Tiffcrop and tiff2pdf", by Richard Nolde
2008.01.25 09:25 "Re: Tiffcrop and tiff2pdf", by Beppe Costagliola
2008.01.25 14:41 "Re: Tiffcrop and tiff2pdf", by Beppe Costagliola
2008.01.26 00:03 "Re: Tiffcrop and tiff2pdf", by Richard Nolde

2008.01.25 05:52 "Tiffcrop and tiff2pdf", by Richard Nolde

  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.
>