Other printf under if

This commit is contained in:
ffsup2
2011-01-05 21:55:36 +01:00
parent 8ce86c6084
commit bff0fa58a5
3 changed files with 11 additions and 6 deletions

View File

@@ -20,6 +20,7 @@
#include <stdio.h> #include <stdio.h>
#include <rawimagesource.h> #include <rawimagesource.h>
#include <rawimagesource_i.h> #include <rawimagesource_i.h>
#include <options.h>
#define MAXVAL 0xffff #define MAXVAL 0xffff
#define CLIP(a) ((a)>0?((a)<MAXVAL?(a):MAXVAL):0) #define CLIP(a) ((a)>0?((a)<MAXVAL?(a):MAXVAL):0)
@@ -194,15 +195,17 @@ void hlmultipliers (int** rec[3], int max[3], int dh, int dw) {
} }
if (!change && phase<4) { if (!change && phase<4) {
phase++; phase++;
printf ("phc %d: %d\n", phase, k); if( options.rtSettings.verbose )
printf ("phc %d: %d\n", phase, k);
} }
else if (!change) else if (!change)
break; break;
if (k%20 == 0) if (k%20 == 0 && options.rtSettings.verbose )
printf ("changed %d\n", changed); printf ("changed %d\n", changed);
} }
printf ("Highlight recovery ends in %d iterations\n", k); if( options.rtSettings.verbose )
printf ("Highlight recovery ends in %d iterations\n", k);
int maxval = MAX(MAX(max[0], max[1]), max[2]); int maxval = MAX(MAX(max[0], max[1]), max[2]);
for (int i=0; i<dh; i++) for (int i=0; i<dh; i++)

View File

@@ -51,8 +51,8 @@ void RawImageSource::updateHLRecoveryMap (bool needred, bool needgreen, bool nee
max[0] = maxr; max[0] = maxr;
max[1] = maxg; max[1] = maxg;
max[2] = maxb; max[2] = maxb;
if( options.rtSettings.verbose )
printf ("Maximum: R: %d, G: %d, B: %d\n", maxr, maxg, maxb); printf ("HLRecoveryMap Maximum: R: %d, G: %d, B: %d\n", maxr, maxg, maxb);
// downscale image // downscale image
int dw = W/SCALE; int dw = W/SCALE;

View File

@@ -24,6 +24,7 @@
#endif #endif
#include <iccmatrices.h> #include <iccmatrices.h>
#include <glib/gstdio.h> #include <glib/gstdio.h>
#include <options.h>
namespace rtengine { namespace rtengine {
@@ -186,7 +187,8 @@ std::vector<std::string> ICCStore::parseDir (Glib::ustring pdir) {
if (!Glib::file_test (fname, Glib::FILE_TEST_IS_DIR)) { if (!Glib::file_test (fname, Glib::FILE_TEST_IS_DIR)) {
int lastdot = sname.find_last_of ('.'); int lastdot = sname.find_last_of ('.');
if (lastdot!=Glib::ustring::npos && lastdot<=(int)sname.size()-4 && (!sname.casefold().compare (lastdot, 4, ".icm") || !sname.casefold().compare (lastdot, 4, ".icc"))) { if (lastdot!=Glib::ustring::npos && lastdot<=(int)sname.size()-4 && (!sname.casefold().compare (lastdot, 4, ".icm") || !sname.casefold().compare (lastdot, 4, ".icc"))) {
// printf ("processing file %s...\n", fname.c_str()); if( options.rtSettings.verbose )
printf ("Processing ICC file: %s...\n", fname.c_str());
Glib::ustring name = sname.substr(0,lastdot); Glib::ustring name = sname.substr(0,lastdot);
ProfileContent pc (fname); ProfileContent pc (fname);
if (pc.data) { if (pc.data) {