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
May 2010

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

2010.05.24 03:52 "Script Oriented, File Based Utility for Resampling TIFF Files", by Kevin Myers
2010.05.24 17:36 "Script to resample large TIFFs", by Richard Nolde
2010.05.24 17:45 "Re: Script Oriented, File Based Utility for Resampling TIFF Files", by Even Rouault

2010.05.24 17:36 "Script to resample large TIFFs", by Richard Nolde

2. Script Oriented, File Based Utility for Resampling TIFF Files

  (Kevin Myers)From: "Kevin Myers"<kmyers1@clearwire.net>
  Subject: [Tiff] Script Oriented, File Based Utility for Resampling
  	TIFF Files
  To:<tiff@lists.maptools.org>
  Message-ID:<3E5E08A7AAB54A65BDCC11B0194A4FB2@KAM1720>
  Content-Type: text/plain; format=flowed; charset="iso-8859-1";
  	reply-type=original

>  I am working with a large number (thousands) of extremely large tiff images
>  (hundreds of megapixels or larger) that need to be resampled, most of them
>  from 300 dpi to 200 dpi.  Currently I am using GraphicsMagick for this
>  purpose  GraphicsMagick is an excellent program, but it is very slow for the
>  images that I am dealing with due to their size and GraphicsMagick's
>  memory-oriented implementation (it essentially wants to load the entire
>  image into memory at one time, since the image won't fit into RAM in the
>  representation used by GraphicsMagick, it is paged to and from disk, which
>  is very slow).

>  In order to speed up this process, I need a script oriented resampling
>  utility that can only load portions of images (e.g tiles or strips) into
>  memory at one time, something similar to tiffcp.  Both tiffcp and its cousin
>  tiffcrop can manipulate tiff images without loading the entire image into
>  memory, but neither is capable of true resampling to my knowledge.  Does
>  anyone know of a script (command line) oriented strip/tile based re-sampling
>  utility for tiff files?

>  Thanks,
>  Kevin M.

While tiffcrop does not yet support re-sampling, you may be able to use
tiffcrop to produce a series of smaller images representing portions of
the original image, and write them to a single output file or a series
of files depending on which export option you select, and then resample
them with Graphics Magick or any program you like.  At that point, you
would need a utility to paste the re-sampled images back into a single
file. Tiffcrop is not yet capable of doing this, but it would not be
hard to add that option if you want to contribute that code.  All the
logic to paste multiple selections into the output buffer already exist.
GraphicsMagick may already have the ability to create a single output
image from a series of input images.

Alternately, if you want to contribute code to resample the data, I can
probably add that to tiffcrop.  Tiffcrop currently reads a Tile or Strip
at at time from the input image and loads the entire image into memory.
It sounds like you might need a special mode to read and process a strip
at a time as well.  I don't remember the format of your images (well
drilling logs?) and what limitations might be imposed by their format.
You might send me the output from tiffinfo and/or tiffdump to see if
that is an issue.

Richard Nolde