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 <rawimagesource.h>
#include <rawimagesource_i.h>
#include <options.h>
#define MAXVAL 0xffff
#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) {
phase++;
printf ("phc %d: %d\n", phase, k);
if( options.rtSettings.verbose )
printf ("phc %d: %d\n", phase, k);
}
else if (!change)
break;
if (k%20 == 0)
if (k%20 == 0 && options.rtSettings.verbose )
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]);
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[1] = maxg;
max[2] = maxb;
printf ("Maximum: R: %d, G: %d, B: %d\n", maxr, maxg, maxb);
if( options.rtSettings.verbose )
printf ("HLRecoveryMap Maximum: R: %d, G: %d, B: %d\n", maxr, maxg, maxb);
// downscale image
int dw = W/SCALE;

View File

@@ -24,6 +24,7 @@
#endif
#include <iccmatrices.h>
#include <glib/gstdio.h>
#include <options.h>
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)) {
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"))) {
// 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);
ProfileContent pc (fname);
if (pc.data) {