AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2011.04.18 17:42 "[Tiff] WhiteLevel with 3.9.5", by Ashish Uthama
2011.04.19 12:47 "[Tiff] WhiteLevel with 3.9.5", by Ashish Uthama
2011.04.19 13:51 "[Tiff] WhiteLevel with 3.9.5", by Ashish Uthama
2011.04.19 14:27 "Re: [Tiff] WhiteLevel with 3.9.5", by Olivier Paquet
2011.04.19 15:19 "Re: [Tiff] WhiteLevel with 3.9.5", by Edward Lam
2011.04.19 15:35 "Re: [Tiff] WhiteLevel with 3.9.5", by Edward Lam
2011.04.19 15:46 "Re: [Tiff] WhiteLevel with 3.9.5", by Edward Lam
2011.04.21 13:02 "Re: [Tiff] WhiteLevel with 3.9.5", by Ashish Uthama
2011.04.24 13:50 "Re: [Tiff] WhiteLevel with 3.9.5", by Edward Lam
2011.04.25 20:40 "Re: [Tiff] WhiteLevel with 3.9.5", by Edward Lam
2011.05.06 14:16 "Re: [Tiff] WhiteLevel with 3.9.5", by

2011.04.21 13:02 "Re: [Tiff] WhiteLevel with 3.9.5", by Ashish Uthama

Yes, spp is 1.

I have attached the test code I used.

The test code crashes with 3.9.5 for this file.

The TIFF file: (~4MB)
http://dl.dropbox.com/u/26885569/example_flipped.dng

PS: Sorry for the multiple posts.

#include "tiffio.h"
#include <stdio.h>

int main(){
  TIFF *tif;

printf("Library version: %s\n", TIFFGetVersion());
tif = TIFFOpen("example_flipped.dng","r");
printf("Setting directory to 0: %d\n",TIFFSetDirectory(tif,0));

//Get the sub ifd
uint16 count;
uint32 *offsets;
if(!TIFFGetField(tif,TIFFTAG_SUBIFD,&count, &offsets)){
  printf("Could not get subifd!\n");
  return -1;
}

printf("SubIFD Count: %d.\n",count);
printf("First SubIFD at: %d.\n",offsets[0]);

//Move to the Sub IFD
if(!TIFFSetSubDirectory(tif,offsets[0])){
  printf("Could not set subdirectory!\n");
  return -1;
}

TIFFClose(tif);

  return 0;
}