Update of /cvsroot/ufraw/ufraw
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv23221

Modified Files:
        configure.ac ufraw.h ufraw_conf.c ufraw_developer.c 
        ufraw_preview.c ufraw_ui.h 
Log Message:
Disable the contrast adjustment by default.


Index: ufraw_developer.c
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_developer.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- ufraw_developer.c   26 Feb 2010 03:30:10 -0000      1.82
+++ ufraw_developer.c   4 Mar 2010 05:08:21 -0000       1.83
@@ -36,7 +36,9 @@
     d->gamma = -1;
     d->linear = -1;
     d->saturation = -1;
+#ifdef UFRAW_CONTRAST
     d->contrast = -1;
+#endif
     for (i=0; i<profile_types; i++) {
        d->profile[i] = NULL;
        strcpy(d->profileFile[i],"no such file");
@@ -582,19 +584,29 @@
     }
 
     if ( conf->saturation!=d->saturation
+#ifdef UFRAW_CONTRAST
         || conf->contrast!=d->contrast
+#endif
          || conf->grayscaleMode == grayscale_luminance ) {
+#ifdef UFRAW_CONTRAST
         d->contrast = conf->contrast;
+#endif
        d->saturation = (conf->grayscaleMode == grayscale_luminance)
            ? 0 : conf->saturation;
        cmsCloseProfile(d->saturationProfile);
        if (d->saturation==1.0
+#ifdef UFRAW_CONTRAST
            && d->contrast==1.0
+#endif
           )
            d->saturationProfile = NULL;
        else
            d->saturationProfile = create_contrast_saturation_profile(
+#ifdef UFRAW_CONTRAST
                    d->contrast,
+#else
+                   1.0,
+#endif
                    d->saturation);
        d->updateTransform = TRUE;
     }

Index: ufraw_preview.c
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_preview.c,v
retrieving revision 1.346
retrieving revision 1.347
diff -u -d -r1.346 -r1.347
--- ufraw_preview.c     2 Mar 2010 21:09:21 -0000       1.346
+++ ufraw_preview.c     4 Mar 2010 05:08:21 -0000       1.347
@@ -1475,7 +1475,9 @@
     gtk_adjustment_set_value(data->ExposureAdjustment, CFG->exposure);
     gtk_adjustment_set_value(data->ThresholdAdjustment, CFG->threshold);
     gtk_adjustment_set_value(data->HotpixelAdjustment, CFG->hotpixel);
+#ifdef UFRAW_CONTRAST
     gtk_adjustment_set_value(data->ContrastAdjustment, CFG->contrast);
+#endif
     gtk_adjustment_set_value(data->SaturationAdjustment, CFG->saturation);
     gtk_adjustment_set_value(data->GammaAdjustment,
            CFG->profile[0][CFG->profileIndex[0]].gamma);
@@ -1499,8 +1501,10 @@
            fabs( conf_default.threshold - CFG->threshold) > 1);
     gtk_widget_set_sensitive(data->ResetHotpixelButton,
            fabs( conf_default.hotpixel - CFG->hotpixel) > 0);
+#ifdef UFRAW_CONTRAST
     gtk_widget_set_sensitive(data->ResetContrastButton,
            fabs( conf_default.contrast - CFG->contrast) > 0.001);
+#endif
     gtk_widget_set_sensitive(data->ResetSaturationButton,
            fabs( conf_default.saturation - CFG->saturation) > 0.001);
     gtk_widget_set_sensitive(data->ResetBaseCurveButton,
@@ -2602,9 +2606,11 @@
        CFG->hotpixel = conf_default.hotpixel;
        ufraw_invalidate_hotpixel_layer(data->UF);
     }
+#ifdef UFRAW_CONTRAST
     if (button==data->ResetContrastButton) {
         CFG->contrast = conf_default.contrast;
     }
+#endif
     if (button==data->ResetSaturationButton) {
        CFG->saturation = conf_default.saturation;
     }
@@ -4824,11 +4830,13 @@
     /* Contrast and Saturation adjustments */
     table = GTK_TABLE(table_with_frame(page, NULL, TRUE));
 
+#ifdef UFRAW_CONTRAST
     data->ContrastAdjustment = adjustment_scale(table, 0, 0, _("Contrast"),
            CFG->contrast, &CFG->contrast, 0, 8.0, 0.01, 0.1, 2, FALSE,
            _("Global contrast adjustment"), G_CALLBACK(adjustment_update),
            &data->ResetContrastButton, _("Reset global contrast to default"),
            G_CALLBACK(button_update));
+#endif
     data->SaturationAdjustment = adjustment_scale(table, 0, 1, _("Saturation"),
            CFG->saturation, &CFG->saturation, 0.0, 8.0, 0.01, 0.1, 2, FALSE,
            _("Saturation"), G_CALLBACK(adjustment_update),

Index: ufraw.h
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw.h,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -d -r1.155 -r1.156
--- ufraw.h     4 Mar 2010 04:52:32 -0000       1.155
+++ ufraw.h     4 Mar 2010 05:08:21 -0000       1.156
@@ -156,7 +156,9 @@
     void *working2displayTransform;
     void *rgbtolabTransform;
     double saturation;
+#ifdef UFRAW_CONTRAST
     double contrast;
+#endif
     CurveData baseCurveData, luminosityCurveData;
     guint16 gammaCurve[0x10000];
     void *luminosityProfile;
@@ -223,7 +225,9 @@
     /* IMAGE manipulation settings */
     double threshold;
     double hotpixel;
+#ifdef UFRAW_CONTRAST
     double contrast;
+#endif
     double exposure, saturation, black; /* black is only used in CMD */
     int ExposureNorm;
     int restoreDetails, clipHighlights;

Index: configure.ac
===================================================================
RCS file: /cvsroot/ufraw/ufraw/configure.ac,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -d -r1.152 -r1.153
--- configure.ac        26 Feb 2010 03:30:10 -0000      1.152
+++ configure.ac        4 Mar 2010 05:08:21 -0000       1.153
@@ -332,6 +332,13 @@
   enable_dst_correction=no)
 AC_MSG_RESULT($enable_dst_correction)
 
+AC_MSG_CHECKING(whether to enable the contrast setting option)
+AC_ARG_ENABLE(contrast,
+  [  --enable-contrast       enable the contrast setting option],
+  AC_DEFINE(UFRAW_CONTRAST, 1, Contrast setting option enabled),
+  enable_contrast=no)
+AC_MSG_RESULT($enable_contrast)
+
 AC_MSG_CHECKING(whether to enable 'None' interpolation)
 AC_ARG_ENABLE(interp_none,
   [  --enable-interp-none    enable 'None' interpolation (mostly for 
debugging)],

Index: ufraw_conf.c
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_conf.c,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -d -r1.166 -r1.167
--- ufraw_conf.c        4 Mar 2010 04:52:32 -0000       1.166
+++ ufraw_conf.c        4 Mar 2010 05:08:21 -0000       1.167
@@ -30,7 +30,9 @@
     /* Image manipulation settings */
     0.0, /* wavelet denoising threshold */
     0.0, /* hotpixel sensitivity */
+#ifdef UFRAW_CONTRAST
     1.0, /* global contrast */
+#endif
     0.0, 1.0, 0.0, /* exposure, saturation, black */
     0, /* ExposureNorm */
     restore_lch_details, /* restoreDetails */
@@ -627,8 +629,10 @@
        sscanf(temp, "%lf", &c->threshold);
     if (!strcmp("HotpixelSensitivity", element))
        sscanf(temp, "%lf", &c->hotpixel);
+#ifdef UFRAW_CONTRAST
     if (!strcmp("Contrast", element))
         sscanf(temp, "%lf", &c->contrast);
+#endif
     if (!strcmp("Exposure", element)) sscanf(temp, "%lf", &c->exposure);
     if (!strcmp("ExposureNorm", element)) sscanf(temp, "%d", &c->ExposureNorm);
     if (!strcmp("Saturation", element)) sscanf(temp, "%lf", &c->saturation);
@@ -980,9 +984,11 @@
        buf = uf_markup_buf(buf,
                "<HotpixelSensitivity>%f</HotpixelSensitivity>\n",
                c->hotpixel);
+#ifdef UFRAW_CONTRAST
     if (c->contrast!=conf_default.contrast)
         buf = uf_markup_buf(buf,
                "<Contrast>%f</Contrast>\n", c->contrast);
+#endif
     if (c->exposure!=conf_default.exposure)
        buf = uf_markup_buf(buf, "<Exposure>%lf</Exposure>\n", c->exposure);
     if (c->ExposureNorm!=conf_default.ExposureNorm)
@@ -1272,7 +1278,9 @@
     dst->threshold = src->threshold;
     dst->exposure = src->exposure;
     dst->hotpixel = src->hotpixel;
+#ifdef UFRAW_CONTRAST
     dst->contrast = src->contrast;
+#endif
     dst->ExposureNorm = src->ExposureNorm;
     dst->saturation = src->saturation;
     dst->black = src->black;
@@ -1440,7 +1448,9 @@
     }
     if (cmd->threshold!=NULLF) conf->threshold = cmd->threshold;
     if (cmd->hotpixel!=NULLF) conf->hotpixel = cmd->hotpixel;
+#ifdef UFRAW_CONTRAST
     if (cmd->contrast!=NULLF) conf->contrast = cmd->contrast;
+#endif
     if (cmd->exposure!=NULLF) {
        conf->exposure = cmd->exposure;
        conf->autoExposure = disabled_state;
@@ -1557,7 +1567,9 @@
    "                      'film' emulate soft film response. (default 
digital).\n"),
 N_("--gamma=GAMMA         Gamma adjustment of the base curve (default 
0.45).\n"),
 N_("--linearity=LINEARITY Linearity of the base curve (default 0.10).\n"),
+#ifdef UFRAW_CONTRAST
 N_("--contrast=CONT       Contrast adjustment (default 1.0).\n"),
+#endif
 N_("--saturation=SAT      Saturation adjustment (default 1.0, 0 for B&W 
output).\n"),
 N_("--wavelet-denoising-threshold=THRESHOLD\n"
 "                      Wavelet denoising threshold (default 0.0).\n"),
@@ -1692,7 +1704,9 @@
        { "linearity", 1, 0, 'L'},
        { "saturation", 1, 0, 's'},
        { "hotpixel-sensitivity", 1, 0, 'H'},
+#ifdef UFRAW_CONTRAST
        { "contrast", 1, 0, 'y'},
+#endif
        { "wavelet-denoising-threshold", 1, 0, 'n'},
        { "exposure", 1, 0, 'e'},
        { "black-point", 1, 0, 'k'},
@@ -1742,7 +1756,9 @@
        &cmd->profile[0][0].gamma, &cmd->profile[0][0].linear,
        &cmd->saturation,
        &cmd->hotpixel,
+#ifdef UFRAW_CONTRAST
        &cmd->contrast,
+#endif
        &cmd->threshold,
        &cmd->exposure, &cmd->black, &interpolationName, &grayscaleName,
        &cmd->shrink, &cmd->size, &cmd->compression,
@@ -1762,7 +1778,9 @@
     cmd->profile[0][0].gamma=NULLF;
     cmd->profile[0][0].linear=NULLF;
     cmd->hotpixel=NULLF;
+#ifdef UFRAW_CONTRAST
     cmd->contrast=NULLF;
+#endif
     cmd->saturation=NULLF;
     cmd->black=NULLF;
     cmd->threshold=NULLF;
@@ -1812,7 +1830,9 @@
        case 'L':
        case 's':
        case 'H':
+#ifdef UFRAW_CONTRAST
        case 'y':
+#endif
        case 'n':
            locale = uf_set_locale_C();
            if (sscanf(optarg, "%lf", (double *)optPointer[index])==0) {

Index: ufraw_ui.h
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_ui.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- ufraw_ui.h  27 Feb 2010 06:36:21 -0000      1.40
+++ ufraw_ui.h  4 Mar 2010 05:08:22 -0000       1.41
@@ -65,7 +65,9 @@
     GtkWidget *ResetExposureButton, *ResetSaturationButton;
     GtkWidget *ResetThresholdButton;
     GtkWidget *ResetHotpixelButton;
+#ifdef UFRAW_CONTRAST
     GtkWidget *ResetContrastButton;
+#endif
     GtkWidget *ResetBlackButton, *ResetBaseCurveButton, *ResetCurveButton;
     GtkWidget *ResetGrayscaleChannelMixerButton;
     GtkWidget *ResetDespeckleButton;
@@ -87,7 +89,9 @@
     GtkAdjustment *ThresholdAdjustment;
     GtkAdjustment *HotpixelAdjustment;
     GtkAdjustment *SaturationAdjustment;
+#ifdef UFRAW_CONTRAST
     GtkAdjustment *ContrastAdjustment;
+#endif
     GtkWidget *LightnessHueSelectNewButton;
     GtkTable *LightnessAdjustmentTable[max_adjustments];
     GtkAdjustment *LightnessAdjustment[max_adjustments];


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
ufraw-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ufraw-cvs

Reply via email to