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
February 2005

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

2005.02.11 06:07 "facing problems with writing compressed tiff image strips.", by Priyanshu Sharma
2005.02.14 10:18 "make the libtiff library compression enabled??", by Priyanshu Sharma
2005.02.14 10:53 "Re: make the libtiff library compression enabled??", by Joris Van Damme
2005.02.16 04:09 "Re: make the libtiff library compression enabled??", by Priyanshu Sharma
2005.02.14 18:08 "Re: make the libtiff library compression enabled??", by <melser.anton@gmail.com>

2005.02.14 10:53 "Re: make the libtiff library compression enabled??", by Joris Van Damme

Priyanshu,

> i guess i have not enabled the compression tag while building the
> libtiff library. can any one tell me how i can do that i.e. what all
> flags i have to specify under the head EXTRAFLAGS label.

I doubt your problem is related to that. Judging from your previous post, it is
more probable that your problem is related to too small a buffer size.

> > buf size i am taking as the StripByteCount for the respective strips.

Yep... When dealing with compressed images, the StripByteCount is usually going
to be smaller then the size of the decompressed strip. TIFFXxxEncodedStrip deals
with *decompressed* strips. Thus, you have yourself a buffer overflow.

Use TIFFXxxRawStrip if you're feeling adventurous and are confident that
compression method and options in source and dest TIFF match. This will enable
you to copy the compressed strips, without any decompression and recompression.
Or either use something like TIFFStripSize to calculate the uncompressed strip
size.

Also, you might come across problems due to blindly copying tags, as opposed to
selectively copying them, if that is what you're doing. Make sure your code
copies only the tags it understands. If not, you could for instance be copying a
tag with a LONG value that actually points to an IFD that you're not copying,
for instance, causing major trouble for a subsequent reader that does know and
use the value of the tag.


Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be/
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html