2014.05.08 23:14 "[Tiff] what's up with all the seeking?", by Jeff Breidenbach

2014.05.08 23:14 "[Tiff] what's up with all the seeking?", by Jeff Breidenbach

Is TIFF fundamentally incompatible with streaming?

===

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

main() {
  TIFF *tiff = TIFFFdOpen(fileno(stdin), "stdin", "rb");
  TIFFClose(tiff);
}

===

$ gcc -o mypgram mypgram.c -ltiff
$ pbmmake 1000 1000 | pnmtotiff -g4 > foo tif
$ myprogram < foo.tif

TIFFFetchDirectory: stdin: Seek error accessing TIFF directory. TIFFReadDirectory: Failed to read directory at offset 40. Segmentation fault (core dumped)