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.15 07:46 "Regarding the decoding of RGB TIFF images.", by Noida Chinku Miandad M
2005.02.15 09:19 "Re: Regarding the decoding of RGB TIFF images.", by Joris Van Damme
2005.02.15 16:10 "Regarding the decoding of uncompressed Big Endian RGB TIFF files.", by Noida Chinku Miandad M
2005.02.15 16:57 "Re: Regarding the decoding of uncompressed Big Endian RGB TIFFfiles.", by Joris Van Damme

2005.02.15 16:57 "Re: Regarding the decoding of uncompressed Big Endian RGB TIFFfiles.", by Joris Van Damme

Chinku,

Bob wrote off-list:
> The poster is dealing with raw uncompressed TIFF files without the
> benefit of something like libtiff.

Ah, now I understand. Sorry I missed that.

Chinku wrote:
> The decoded image appears like a grayscale one. Also colored lines are
> appearing above the image. It seems like the image lines are getting
> corrupted slightly.

The colored lines at the top of the image are probably noisy, not showing any
signs of being true image data, right? My guess is that you have an incorrect
offset of the image data. Other then that, I cannot tell. Compare the offset
your code is working with, with the offset as read by LibTiff, or shown by a Tag
Viewer like  http://www.awaresystems.be/imaging/tiff/astifftagviewer.html.

> Do I need to do some swapping in the RGB data that I read from the image
> file? I am asking this since the file is of a big endian type.

The byte order should not matter as far as the actual image color data is
concerned, since it's all 8bit data. Swapping issues only apply to 16bit and
32bit data (and 64bit data, in the new BigTIFF). There's no swapping of channels
or such, RGB is supposed to always be R-G-B no matter what byteorder the TIFF
file.

Thus, if you're not having the sample problem with little endian files, my guess
is that you're probably not byteswapping **the strip or tile offset** correctly.

> I think I am getting the luminance component correct. But it seems like
> there is some problems with the chrominance components since I am not
> getting the proper color.

Totally weird. There's no luminance/chrominance in RGB data. Must be another and
unrelated bug, like e.g. taking the data from one single channel and using it
for all of R, G, and B, or something. I'm only guessing, though.

BTW, thanks for changing to the clean nice plain text mail format!!


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