Tumble-users Digest, Vol 2, Issue 1
Fred Jan Kraan
fjkraan at xs4all.nl
Tue Dec 26 03:41:35 PST 2006
"Eric Smith" wrote:
>
> There are three possibilities for input B/W TIFF files:
>
> No photometric interpretation flag
> photometric interpretation black=0, white=1
> photometric interpretation black=1, white=0
>
> I know that tumble as released gets at least one of these cases
> wrong, and more likely two, but I have not had time to sort it out.
>
For my usage the problems were fixed by the following changes:
removed the pbm support from the Makefile (could not find the library
and did not need it):
fjkraan at UbVar:~$ diff tumble/Makefile tumble-0.33/Makefile
34c34
< LDLIBS = -ltiff -ljpeg -lpbm -lz -lm
---
> LDLIBS = -ltiff -ljpeg -lz -lm
110c110
< tumble_input.o tumble_tiff.o tumble_jpeg.o tumble_pbm.o \
---
> tumble_input.o tumble_tiff.o tumble_jpeg.o \
tumble_input.h:
fjkraan at UbVar:~$ diff tumble/tumble_input.h tumble-0.33/tumble_input.h
29a30
> uint16_t photometric;
tumble_tiff.c:
fjkraan at UbVar:~$ diff tumble/tumble_tiff.c tumble-0.33/tumble_tiff.c
103a104
> uint16_t photometric;
145a147,159
> if (1 != TIFFGetField (tiff_in, TIFFTAG_PHOTOMETRIC, & photometric))
> {
> fprintf (stderr, "can't get photometric tag\n");
> return (0);
> } else {
> if (photometric != 0 && photometric != 1)
> {
> fprintf (stderr, "value for photometric tag \'%d\' not
supported\n", photometric);
> return (0);
> }
> image_info->photometric = photometric;
> }
>
336c350,352
< 0); /* BlackIs1 */
---
> image_info->photometric);
> /*1); BlackIs1 (original value was 0, reversing
> tiff originated pdf. fjk20061223*/
Fred Jan
More information about the Tumble-users
mailing list