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 2006

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

2006.02.06 17:12 "Mega newbie question", by Dermot Paikkos
2006.02.06 17:42 "Re: Mega newbie question", by Joris Van Damme
2006.02.07 10:26 "Re: Mega newbie question", by Dermot Paikkos
2006.02.07 11:48 "Re: Mega newbie question", by Joris Van Damme
2006.02.07 13:11 "Re: Mega newbie question", by Dermot Paikkos
2006.02.07 13:38 "Re: Mega newbie question", by Joris Van Damme
2006.02.07 15:35 "Re: Mega newbie question", by Bob Friesenhahn
2006.02.07 16:27 "Re: Mega newbie question", by Joris Van Damme

2006.02.06 17:12 "Mega newbie question", by Dermot Paikkos

Hi,

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;
}

=========================