TIFF and LibTiff Mail List Archive

1998.10.01 13:33 "TIFF Question about Writing out Photoshop Resources.", by Giancarlo D'Ulisse


we are using Version 3.4beta037 of the TIFF Library and I have modified it to read Adobe Photoshop resource information:

#define TIFFTAG_PHOTOSHOPRES                            34377

When reading this information TIFFGetField() we do the following:

if (TIFFGetField(tif, TIFFTAG_PHOTOSHOPRES, &resourceLength,
          &resourceOffset) && resourceLength) {

     // allocate some space here for the read.

     TIFFSeekFile(tif, (toff_t) resourceOffset, SEEK_SET);
     if (!ReadOK(tif, resourcePtr, resourceLength)) {

Everything works fine. The problem I am encountering is how to modify the code to write the same information out. I tried to find a similar case in the library but was unable to. Do I get the current position of the file and then write the data and then write the tag? Is order important with respect to other TAG information (ie. should I only do this last or is it ok to wriite this stuff out at any time)?

Thank you very much for your time.
Giancarlo D'Ulisse

Giancarlo D'Ulisse
Sr. Progammer/Analyst                     Voice:  (905) 763-9277 Ext. 224
Warp 10 Technologies Inc.                 Fax:    (905) 763-1360
9120 Leslie Street, Suite 101             E-Mail:
Richmond Hill, Ontario                    WWW:
L4B 3J9