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
March 2004

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

2004.03.15 23:58 "libtiff and streams", by Dimitar Gospodinov
2004.03.16 00:14 "Re: libtiff and streams", by Bob Friesenhahn
2004.03.16 00:43 "Re: libtiff and streams", by Joris Van Damme
2004.03.16 01:38 "Re: libtiff and streams", by Dimitar Gospodinov
2004.03.16 02:08 "Re: libtiff and streams", by Joris Van Damme
2004.03.16 06:56 "Re: libtiff and streams", by Andrey Kiselev
2004.03.16 12:16 "Re: libtiff and streams", by <d_sf@cox.net>
2004.03.16 04:30 "Re: libtiff and streams", by Frank Warmerdam
2004.03.16 08:00 "Re: libtiff and streams", by Rob Tillaart
2004.03.16 08:25 "Re: libtiff and streams", by Andrey Kiselev

2004.03.16 08:25 "Re: libtiff and streams", by Andrey Kiselev

On Tue, Mar 16, 2004 at 09:00:32AM +0100, Rob van den Tillaart wrote:
> So if you want to do streaming you should have a TIFF_2_TIFF-F
> normalizer in the front of the pipeline and every filter in the
> pipeline should write according to TIFF-F. But as stated in the RFC
> the filters should be able to read non TIFF-F conforming TIFF format
> to be more generic. 

And to place IFD in front of image data it should be enough to call
TIFFCheckpointDirectory() after setting all tags. Something like:

    out = TIFFOpen("out.tif", "w");
    TIFFSetField(out, TIFFTAG_IMAGEWIDTH, image_width);
    TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, bpp);
    TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, spp);
    TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
    TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photo);
    TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
    TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, TIFFDefaultStripSize(out, 0));

    TIFFCheckpointDirectory(out);

    for (i = 0; i < image_height; i++)
        TIFFWriteScanline(out, buf + i * image_width * spp, i, 0);

    TIFFClose(out);

Just a suggestion fro those, who want to create TIFFs, suitable for
sequental access.

						Andrey

-- 
Andrey V. Kiselev
Home phone:  +7 812 5274898  ICQ# 26871517