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.25 08:51 "How to get a thumbnail View for a single page TIFF file.", by Priyanshu Sharma
2005.02.25 10:50 "Re: How to get a thumbnail View for a single page TIFF file.", by Joris Van Damme
2005.02.25 12:27 "Re: How to get a thumbnail View for a single page TIFF file.", by Priyanshu Sharma
2005.02.25 13:06 "Re: How to get a thumbnail View for a single page TIFF file.", by Joris Van Damme

2005.02.25 13:06 "Re: How to get a thumbnail View for a single page TIFF file.", by Joris Van Damme

Priyanshu,

> PROBLEM:
> I have a 1 page tiff file and i want to get its thumbnailview as
> another tiff file.

Do you want to write a new TIFF file, with some image (that is a thumbnail
version of another TIFF file, but it should not matter)?
- If not, I still don't understand your intentions.
- If so, this is normal TIFF writing... Don't let the fact that your destination
single-page TIFF file's image is the thumbnail of another input TIFF confuse
you, it doesn't matter where your input comes from.

For normal writing of a new singlepage TIFF file:

- First use TIFFOpen with the 'w' flag
- Next use TIFFSetField to set all basic tags, like
    - ImageWidth, ImageLength
    - BitsPerSample, SamplesPerPixel
    - possibly XResolution, YResolution, ResolutionUnit
    - Photometric, Compression
- Another set of tags you need to set now, depends on whether you intend to
write a stripped or tiled TIFF. Since you seem to want to write a thumbnail
sized image, I guess stripped TIFF is the way to go. In this case, set the
RowsPerStrip tag. If the thumbnail is small enough, set it to the complete
ImageLength
- Next you need to write the actual pixel data. How to do this, again depends on
whether you intend to write a stripped or tile TIFF. For a stripped TIFF, the
most convinient function to use is probably TIFFWriteScanline.
- Finally use TIFFClose.

Is this what you're after? Andrey at one time posted loads of useful code
snippets for related tasks to the mailing list, be sure to also browse the
archive at http://www.awaresystems.be/imaging/tiff/tml.html. I can't do the
same, I'm a Delphi coder and no longer used to writing C.


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