[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcvd-members] libcvd/pnm_src tiff.cxx
From: |
Edward Rosten |
Subject: |
[libcvd-members] libcvd/pnm_src tiff.cxx |
Date: |
Tue, 16 Nov 2010 20:11:17 +0000 |
CVSROOT: /cvsroot/libcvd
Module name: libcvd
Changes by: Edward Rosten <edrosten> 10/11/16 20:11:17
Modified files:
pnm_src : tiff.cxx
Log message:
Check bug fix and verbose mode into the mainline
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/pnm_src/tiff.cxx?cvsroot=libcvd&r1=1.16&r2=1.17
Patches:
Index: tiff.cxx
===================================================================
RCS file: /cvsroot/libcvd/libcvd/pnm_src/tiff.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- tiff.cxx 13 Oct 2010 17:20:24 -0000 1.16
+++ tiff.cxx 16 Nov 2010 20:11:17 -0000 1.17
@@ -216,6 +216,14 @@
TIFFClose(tif);
}
+#ifdef CVD_INTERNAL_VERBOSE_TIFF
+ #define LOG(X) do{ cerr << X; }while(0)
+ #define VAR(X) #X << " = " << X
+#else
+ #define LOG(X)
+ #define VAR(X)
+#endif
+
TIFFPimpl::TIFFPimpl(istream& is)
:i(is),row(0)
@@ -245,15 +253,26 @@
TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w);
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h);
TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bitspersample);
- TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &spp);
+
+ TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &spp);
+
TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photo);
TIFFGetField(tif, TIFFTAG_PLANARCONFIG, &pl_type);
+ LOG(VAR(w) << endl);
+ LOG(VAR(h) << endl);
+ LOG(VAR(bitspersample) << endl);
+ LOG(VAR(spp) << endl);
+ LOG(VAR(photo) << endl);
+ LOG(VAR(pl_type) << endl);
+
+
//Read the sample format. If it is missing, then it
//defaults to unsigned int as per the spec.
if(TIFFGetField(tif, TIFFTAG_SAMPLEFORMAT, &sampleformat) == 0)
sampleformat = SAMPLEFORMAT_UINT;
+ LOG(VAR(sampleformat) << endl);
my_size.x = w;
my_size.y = h;
@@ -322,6 +341,9 @@
if(type == "bool")
bool_rowbuf.resize((size().x + 7)/8);
+ LOG(VAR(type) << endl);
+ LOG(VAR(use_cooked_rgba_interface) << endl);
+
if(use_cooked_rgba_interface)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libcvd-members] libcvd/pnm_src tiff.cxx,
Edward Rosten <=