AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2003.11.21 18:57 "[Tiff] Trouble reading color tiff image files", by Rutger T.
2003.11.21 19:36 "[Tiff] Trouble reading color tiff image files", by Frank Warmerdam

2003.11.21 18:57 "[Tiff] Trouble reading color tiff image files", by Rutger T.

Hi,

I am new to the list. I am very interested in using tiff files with some code that I am writing and am naturally using libtiff to do that. Unfortunately, I am having some trouble reading color tiff files. Therefore, as there was not much information regarding my particular problem on the web I hope that you (the experts) may help me. The solution is most likely very trivial for you guys. :)

While I have had no problems reading gray scale tiff files I have had some mixed success with reading color tiff images properly. Therefore, I went back to square one and am currently simlply trying to have my code output the RGB samples of the correctly read color image (which filename is "input.tif") to the screen. (I'm intentionally not printing all image pixels to the screen at the moment.) However, what my code currently does is output partially correct results. It seems to display the first few (~10) samples fine to the screen, but then starts skipping samples. Once I know that everything is read correctly into memory things should be golden.

Since I am not really sure where in my code I am messing up I have provided the entire "barebones code" of what I described above here (it's not long, but I thought the linked page would hold formatting better than pasting it into an email):

https://filebox.vt.edu/users/hthomsch/tiff/color1.c

And here is a link to the image ("input.tif") that I am testing with:

https://filebox.vt.edu/users/hthomsch/tiff/input.tif

So, at this point, all I am trying to do is read in the color image correctly and output the first several RGB samples (to verify) to the screen.

Do you guys have any ideas what may be causing my problems? What may be wrong with my code? Is it because of improper use of headers?

Since I'm stumped and have tried many things already, *any* suggestions/pointers would be greatly appreciated.

Thank you.

Sincerely,
Rutger

--
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm