|
-
March 10th, 2003, 10:01 AM
#1
[LibTIFF] Reading TIFF tags
Hello !!
I have the following problem: I have difficulties reading tags from a TIFF file using the TIFFGetField() function. I can read without problems the TIFFTAG_IMAGEWIDTH, TIFFTAG_IMAGELENGTH, TIFFTAG_BITSPERSAMPLE, etc... tags, but I can't retrieve the TIFFTAG_STRIPOFFSETS tag. For example, when I try to read this tag, I get the value 3146512, when it should return 2000. What is odd, is that when I use the version 3.5.7 of LibTIFF, I get 3146512, and with the version 3.5.6 beta I get 1265600... and when I use fseek() + fread() I can easily retrieve the value I'm looking for.
Does anyone know what's happening here ? What am I doing wrong ??? I'd be very happy if someone has an idea to solve my problem, as I am quite lost right now. 
Thanks
Last edited by Mournblade; March 10th, 2003 at 10:07 AM.
-
March 10th, 2003, 11:26 AM
#2
Since the source code to LibTiff is available, why not compile the LibTiff source and debug it?
Regards,
Paul McKenzie
-
March 10th, 2003, 11:56 AM
#3
Originally posted by Paul McKenzie
Since the source code to LibTiff is available, why not compile the LibTiff source and debug it?
Regards,
Paul McKenzie
Hello Paul,
I did the compilation, but I did not find the function TIFFGetField() in the source code.
And as I am not a C ++ expert (i'm begining in the use of VC++), I'm learning the debuging. 
Anyway, thanks for your answer.
-
March 10th, 2003, 12:20 PM
#4
LibTiff is a C library, not a C++ library. Did you search all of the headers and the .C (not .CPP) files? If you compiled it, then TiffGetField() is there, either as a function or it could be a macro.
Also, if you did compile it with debug info, all you need to do is put a breakpoint on the call to TiffGetField and just step into the function call. The debugger will go to the right place in the LibTiff code.
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|