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
December 2003

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

2003.12.26 02:25 "problems with custom TIFF", by Pushkar Pradhan
2003.12.26 09:36 "Re: problems with custom TIFF", by Andrey Kiselev
2003.12.30 00:09 "Re: problems with custom TIFF", by Pushkar Pradhan
2003.12.30 00:27 "Re: problems with custom TIFF", by Joris Van Damme
2003.12.30 00:47 "Re: problems with custom TIFF", by Pushkar Pradhan
2003.12.30 01:09 "Re: problems with custom TIFF", by Joris Van Damme
2003.12.31 11:40 "Re: problems with custom TIFF", by Andrey Kiselev
2004.01.01 23:11 "Re: problems with custom TIFF", by Pushkar Pradhan

2003.12.26 02:25 "problems with custom TIFF", by Pushkar Pradhan

I'm working on a TIFF created by ERDAS IMAGINE 8.6, a remote sensing/GIS
software.
The file info as given by tiffinfo (it warns about a few custom tags that it
can't read, these are above 32000):
  Image Width: 421 Image Length: 295
  Resolution: 1, 1 (unitless)
  Bits/Sample: 16
  Sample Format: unsigned integer
  Compression Scheme: None
  Photometric Interpretation: min-is-black
  Extra Samples: 2<unspecified, unspecified>
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 3
  Rows/Strip: 9
  Planar Configuration: single image plane
  Software: IMAGINE TIFF Support

I read in the 3 bands using TIFFReadEncodedStrip and write out to a new file
(after converting RGB to LHS in IEEE FP format). This is info given by
tiffinfo of output file:
  Image Width: 421 Image Length: 295
  Bits/Sample: 32
  Sample Format: IEEE floating point
  Compression Scheme: None
  Photometric Interpretation: min-is-black
  Samples/Pixel: 3
  Rows/Strip: 9
  Planar Configuration: single image plane

However, the software is unable to open this file. I suspect this has got
something to do with the Extra Samples: 2<unspecified, unspecified> thing? I
found out that this tells whether there is alpha information in the file or
not. But can somebody explain to me how to read it? The man page is
confusing. Also once I get it what should I do with it when writing out the
output file?

Here's my code for more information:
 size = TIFFReadEncodedStrip(tif, strip, bufRGB, (tsize_t)-1);
      Rgb2Lhs(bufRGB, bufRGB+size, bufRGB+(size*2), tags.dType, tags.config,
              bufLHS, bufLHS+size, bufLHS+(size*2),
              tags.imageLength, tags.rowsPerStrip);
 size = TIFFWriteEncodedStrip(wtif, strip, bufLHS, size*sizeof(float));

Thanks,
Pushkar Pradhan