diff options
author | olivier <olivier> | 2010-05-06 02:56:17 +0000 |
---|---|---|
committer | olivier <olivier> | 2010-05-06 02:56:17 +0000 |
commit | df177352a51f2d943a9e433a2355270eb06a4ab0 (patch) | |
tree | 22a1a270c1e1da09b87bef358b5fd235056466d9 /libtiff/tif_print.c | |
parent | a87273d9547d8170934f16a23e491ae589c0c512 (diff) | |
download | libtiff-df177352a51f2d943a9e433a2355270eb06a4ab0.tar.gz |
* libtiff/tif_print.c: Fixed printing of TIFFTAG_REFERENCEBLACKWHITE which
had stopped working. Also made it always print 6 floats instead of
2*SamplesPerPixel.
http://bugzilla.maptools.org/show_bug.cgi?id=2191
http://bugzilla.maptools.org/show_bug.cgi?id=2186
Diffstat (limited to 'libtiff/tif_print.c')
-rw-r--r-- | libtiff/tif_print.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c index 571e584e..0afba657 100644 --- a/libtiff/tif_print.c +++ b/libtiff/tif_print.c @@ -1,4 +1,4 @@ -/* $Id: tif_print.c,v 1.49 2010-03-10 18:56:49 bfriesen Exp $ */ +/* $Id: tif_print.c,v 1.50 2010-05-06 02:56:17 olivier Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -163,17 +163,6 @@ _TIFFPrettyPrintField(TIFF* tif, FILE* fd, uint32 tag, fprintf(fd, " White Point: %g-%g\n", ((float *)raw_data)[0], ((float *)raw_data)[1]); return 1; - case TIFFTAG_REFERENCEBLACKWHITE: - { - uint16 i; - - fprintf(fd, " Reference Black/White:\n"); - for (i = 0; i < td->td_samplesperpixel; i++) - fprintf(fd, " %2d: %5g %5g\n", i, - ((float *)raw_data)[2*i+0], - ((float *)raw_data)[2*i+1]); - return 1; - } case TIFFTAG_XMLPACKET: { uint32 i; @@ -497,6 +486,13 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) } else fprintf(fd, "(present)\n"); } + if (TIFFFieldSet(tif,FIELD_REFBLACKWHITE)) { + fprintf(fd, " Reference Black/White:\n"); + for (i = 0; i < 3; i++) + fprintf(fd, " %2d: %5g %5g\n", i, + td->td_refblackwhite[2*i+0], + td->td_refblackwhite[2*i+1]); + } if (TIFFFieldSet(tif,FIELD_TRANSFERFUNCTION)) { fprintf(fd, " Transfer Function: "); if (flags & TIFFPRINT_CURVES) { |