AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

1997.01.30 23:32 "write subset", by Thomas Loecherbach
1997.01.31 07:30 "Re: write subset", by Kyriakos Georgiou
1997.01.31 07:51 "Re: write subset", by Rainer Wiesenfarth
1997.01.31 13:39 "Re: write subset", by Kyriakos Georgiou
1997.02.03 09:16 "gigamem", by Dr. Klaus Bartz
1997.01.31 16:07 "Re: write subset", by Sam Leffler
1997.01.31 16:13 "Re: write subset", by Gary Burgess
1997.01.31 17:01 "Re: write subset", by Dr. Klaus Bartz

1997.01.31 16:13 "Re: write subset", by Gary Burgess

Why do the members of this list always assume that an image would fit completely in main memory? What if you use images with a minimum size of 70MB (grayscale) or 210MB (RGB) (like we do)? The limit of TIFF images is given by the 32-Bit offsets used. This allows images of at least 2GB in size. It is a bad approach to copy the whole file when applying changes. If you want to update this kind of images, you have to 'program around' libtiff. In case you use uncompressed images, you can modify images by getting the TIFF fields StripOffsets or TileOffsets and do the reading/writing by hand.

This approach is not very handy, but - as far as I know - the only solution when you want to use libtiff. BTW, I would be very happy if Sam would introduce random access to libtiff. But I also know that this is not that easy (simply think of compressed images).

I don't see this as being the only possible approach. TIFF is a suitable format for large files mainly because of its strip/tile organization. With libtiff it's a snap to handle these files an appropriate piece at a time.

PS: Does anyone know about image processing tools that work on files and not in main memory?

I don't see how image processing can avoid using main memory to at least some extent. I think the standard approach is to use a tiled version of the image. The only thing to watch out for is to properly handle tile boundaries so as not to introduce visual artifacts.

Gary

---------------------------------------------------------------------------
Gary Burgess                                       gburgess@zgs.com
Zeh Graphic Systems, Inc.                          (281) 589 7757