| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2006.02.06 17:12 "Mega newbie question", by Dermot PaikkosHi,
I'll apologise in advance as I am very green with C.
I have been reading the docs at awaresystems.com on accessing the
PhotoShop thumbnails within a tiff file.
I am not sure what I am getting back from GetField. If I run the
program below I get
Value of GetField = 10124416
Does that mean that the length of the block is 10124416 bytes? Or is
this just it's unique identifier?
What I am trying to do is loop from the start of this PHOTOSHOP tag
to the end. I want to try and extract the various fields along the
way. Ultimately I'd like extract the thumbnail within if one exists
but I think I am a way of that yet.
So can someone give me a few tips and possibly explain how to use the
return value from TIFFGetField I could make a start.
Thanx.
Dp.
=======================
#include <stdio.h>
#include <tiffio.h>
main()
{
int hasPSfield;
TIFF* tif = TIFFOpen("test.tif", "r");
if (tif == NULL) {
printf("Failed to open file\n");
exit(8);
}
TIFFGetField(tif,TIFFTAG_PHOTOSHOP &hasPSfield);
if (hasPSfield >= 1) {
printf("Value of GetField = %d\n", hasPSfield );
}
TIFFClose(tif);
return 0;
}
=========================
|
|||||||