Update of /cvsroot/ufraw/ufraw
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv670

Modified Files:
        configure.ac ufraw.h ufraw_conf.c ufraw_developer.c 
        ufraw_preview.c ufraw_ufraw.c ufraw_ui.h 
Log Message:
Enable contrast setting and hot pixel elimination by default.

Index: ufraw_developer.c
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_developer.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- ufraw_developer.c   4 Oct 2009 09:00:24 -0000       1.74
+++ ufraw_developer.c   21 Oct 2009 14:00:20 -0000      1.75
@@ -45,9 +45,7 @@
     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");
@@ -613,29 +611,19 @@
     }
 
     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.289
retrieving revision 1.290
diff -u -d -r1.289 -r1.290
--- ufraw_preview.c     21 Oct 2009 01:34:49 -0000      1.289
+++ ufraw_preview.c     21 Oct 2009 14:00:20 -0000      1.290
@@ -1370,12 +1370,8 @@
     gtk_adjustment_set_value(data->GreenAdjustment, CFG->green);
     gtk_adjustment_set_value(data->ExposureAdjustment, CFG->exposure);
     gtk_adjustment_set_value(data->ThresholdAdjustment, CFG->threshold);
-#ifdef UFRAW_HOTPIXELS
     gtk_adjustment_set_value(data->HotpixelAdjustment, CFG->hotpixel);
-#endif
-#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);
@@ -1411,14 +1407,10 @@
            fabs( conf_default.exposure - CFG->exposure) > 0.001);
     gtk_widget_set_sensitive(data->ResetThresholdButton,
            fabs( conf_default.threshold - CFG->threshold) > 1);
-#ifdef UFRAW_HOTPIXELS
     gtk_widget_set_sensitive(data->ResetHotpixelButton,
            fabs( conf_default.hotpixel - CFG->hotpixel) > 0);
-#endif
-#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,
@@ -1820,9 +1812,7 @@
 
 static void create_base_image(preview_data *data)
 {
-#ifdef UFRAW_HOTPIXELS
     gchar buf[20];
-#endif
     int shrinkSave = CFG->shrink;
     int sizeSave = CFG->size;
     CFG->shrink = zoom_to_scale(CFG->Zoom);
@@ -1842,10 +1832,8 @@
            data->UF->conf->rotationAngle);
     CFG->shrink = shrinkSave;
     CFG->size = sizeSave;
-#ifdef UFRAW_HOTPIXELS
     g_snprintf(buf, sizeof (buf), "%d", data->UF->hotpixels);
     gtk_label_set_text(data->HotpixelCount, buf);
-#endif
 }
 
 static void update_shrink_ranges(preview_data *data)
@@ -2569,17 +2557,13 @@
        CFG->threshold = conf_default.threshold;
        preview_invalidate_layer(data, ufraw_denoise_phase);
     }
-#ifdef UFRAW_HOTPIXELS
     if (button==data->ResetHotpixelButton) {
        CFG->hotpixel = conf_default.hotpixel;
        preview_invalidate_layer(data, ufraw_first_phase);
     }
-#endif
-#ifdef UFRAW_CONTRAST
     if (button==data->ResetContrastButton) {
         CFG->contrast = conf_default.contrast;
     }
-#endif
     if (button==data->ResetSaturationButton) {
        CFG->saturation = conf_default.saturation;
     }
@@ -2730,13 +2714,11 @@
            if (!Developer->doWB) // !doWB means do interpolate
                preview_invalidate_layer(data, ufraw_first_phase);
            render_preview(data);
-#ifdef UFRAW_HOTPIXELS
        } else if ( valuep==&data->UF->mark_hotpixels ) {
            if (data->UF->hotpixels) {
                preview_invalidate_layer(data, ufraw_first_phase);
                render_preview(data);
            }
-#endif
        }
     }
 }
@@ -2826,10 +2808,8 @@
         if (CFG->autoBlack==enabled_state) CFG->autoBlack = apply_state;
     } else if (valuep==&CFG->threshold) {
        preview_invalidate_layer(data, ufraw_denoise_phase);
-#ifdef UFRAW_HOTPIXELS
     } else if (valuep==&CFG->hotpixel) {
        preview_invalidate_layer(data, ufraw_first_phase);
-#endif
     } else {
         if (CFG->autoExposure==enabled_state) CFG->autoExposure = apply_state;
         if (CFG->autoBlack==enabled_state) CFG->autoBlack = apply_state;
@@ -3867,7 +3847,6 @@
     gtk_widget_show_all(menu);
 }
 
-#ifdef UFRAW_HOTPIXELS
 static void hotpixel_fill_interface(preview_data *data, GtkWidget *page)
 {
     GtkWidget *button;
@@ -3910,7 +3889,6 @@
     gtk_widget_set_sensitive(button, FALSE);
     data->ResetHotpixelButton = button;
 }
-#endif
 
 static void livehistogram_fill_interface(preview_data *data,
        GtkTable *table)
@@ -4244,10 +4222,8 @@
            &data->ResetThresholdButton,
            _("Reset denoise threshold to default"), G_CALLBACK(button_update));
 
-#ifdef UFRAW_HOTPIXELS
     /* Hot pixel shaving */
     hotpixel_fill_interface(data, page);
-#endif
 
     // Dark frame controls:
     box = GTK_BOX(gtk_hbox_new(FALSE, 0));
@@ -4554,13 +4530,11 @@
     /* 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.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- ufraw.h     7 Oct 2009 00:28:32 -0000       1.125
+++ ufraw.h     21 Oct 2009 14:00:20 -0000      1.126
@@ -102,9 +102,7 @@
     void *colorTransform;
     void *rgbtolabTransform;
     double saturation;
-#ifdef UFRAW_CONTRAST
     double contrast;
-#endif
     CurveData baseCurveData, luminosityCurveData;
     guint16 gammaCurve[0x10000];
     void *luminosityProfile;
@@ -165,12 +163,8 @@
     double temperature, green;
     double chanMul[4];
     double threshold;
-#ifdef UFRAW_HOTPIXELS
     double hotpixel;
-#endif
-#ifdef UFRAW_CONTRAST
     double contrast;
-#endif
     double exposure, saturation, black; /* black is only used in CMD */
     int ExposureNorm;
     int restoreDetails, clipHighlights;
@@ -285,10 +279,8 @@
     int postproc_ops; /* postprocessing operations (LF_MODIFY_XXX) */
     lfModifier *modifier;
 #endif /* HAVE_LENSFUN */
-#ifdef UFRAW_HOTPIXELS
     int hotpixels;
     gboolean mark_hotpixels;
-#endif
 } ufraw_data;
 
 extern const conf_data conf_default;

Index: configure.ac
===================================================================
RCS file: /cvsroot/ufraw/ufraw/configure.ac,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -d -r1.142 -r1.143
--- configure.ac        20 Oct 2009 04:05:10 -0000      1.142
+++ configure.ac        21 Oct 2009 14:00:20 -0000      1.143
@@ -363,20 +363,6 @@
   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 hot pixel elimination)
-AC_ARG_ENABLE(hotpixels,
-  [  --enable-hotpixels      enable hot pixel elimination],
-  AC_DEFINE(UFRAW_HOTPIXELS, 1, Hot pixel elimination enabled),
-  enable_hotpixels=no)
-AC_MSG_RESULT($enable_hotpixels)
-
 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.148
retrieving revision 1.149
diff -u -d -r1.148 -r1.149
--- ufraw_conf.c        7 Oct 2009 01:22:52 -0000       1.148
+++ ufraw_conf.c        21 Oct 2009 14:00:20 -0000      1.149
@@ -36,12 +36,8 @@
     6500, 1.0, /* temperature, green */
     { -1.0, -1.0, -1.0, -1.0 }, /* chanMul[] */
     0.0, /* wavelet denoising threshold */
-#ifdef UFRAW_HOTPIXELS
     0.0, /* hotpixel sensitivity */
-#endif
-#ifdef UFRAW_CONTRAST
     1.0, /* global contrast */
-#endif
     0.0, 1.0, 0.0, /* exposure, saturation, black */
     0, /* ExposureNorm */
     restore_lch_details, /* restoreDetails */
@@ -628,14 +624,10 @@
     }
     if (!strcmp("WaveletDenoisingThreshold", element))
        sscanf(temp, "%lf", &c->threshold);
-#ifdef UFRAW_HOTPIXELS
     if (!strcmp("HotpixelSensitivity", element))
        sscanf(temp, "%lf", &c->hotpixel);
-#endif
-#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);
@@ -946,17 +938,13 @@
        buf = uf_markup_buf(buf,
                "<WaveletDenoisingThreshold>%d</WaveletDenoisingThreshold>\n",
                (int)floor(c->threshold));
-#ifdef UFRAW_HOTPIXELS
     if (c->hotpixel!=conf_default.hotpixel)
        buf = uf_markup_buf(buf,
                "<HotpixelSensitivity>%f</HotpixelSensitivity>\n",
                c->hotpixel);
-#endif
-#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)
@@ -1223,12 +1211,8 @@
     g_strlcpy(dst->model, src->model, max_name);
     dst->threshold = src->threshold;
     dst->exposure = src->exposure;
-#ifdef UFRAW_HOTPIXELS
     dst->hotpixel = src->hotpixel;
-#endif
-#ifdef UFRAW_CONTRAST
     dst->contrast = src->contrast;
-#endif
     dst->ExposureNorm = src->ExposureNorm;
     dst->saturation = src->saturation;
     dst->black = src->black;
@@ -1402,12 +1386,8 @@
        conf->autoExposure = cmd->autoExposure;
     }
     if (cmd->threshold!=NULLF) conf->threshold = cmd->threshold;
-#ifdef UFRAW_HOTPIXELS
     if (cmd->hotpixel!=NULLF) conf->hotpixel = cmd->hotpixel;
-#endif
-#ifdef UFRAW_CONTRAST
     if (cmd->contrast!=NULLF) conf->contrast = cmd->contrast;
-#endif
     if (cmd->exposure!=NULLF) {
        conf->exposure = cmd->exposure;
        conf->autoExposure = disabled_state;
@@ -1529,16 +1509,12 @@
    "                      '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"),
-#ifdef UFRAW_HOTPIXELS
 N_("--hotpixel-sensitivity=VALUE\n"
 "                      Sensitivity for detecting and shaving hot pixels 
(default 0.0).\n"),
-#endif
 N_("--exposure=auto|EXPOSURE\n"
 "                      Auto exposure or exposure correction in EV (default 
0).\n"),
 N_("--black-point=auto|BLACK\n"
@@ -1652,12 +1628,8 @@
        { "gamma", 1, 0, 'G'},
        { "linearity", 1, 0, 'L'},
        { "saturation", 1, 0, 's'},
-#ifdef UFRAW_HOTPIXELS
        { "hotpixel-sensitivity", 1, 0, 'H'},
-#endif
-#ifdef UFRAW_CONTRAST
        { "contrast", 1, 0, 'y'},
-#endif
        { "wavelet-denoising-threshold", 1, 0, 'n'},
        { "exposure", 1, 0, 'e'},
        { "black-point", 1, 0, 'k'},
@@ -1699,12 +1671,8 @@
        &baseCurveName, &baseCurveFile, &curveName, &curveFile,
        &cmd->profile[0][0].gamma, &cmd->profile[0][0].linear,
        &cmd->saturation,
-#ifdef UFRAW_HOTPIXELS
        &cmd->hotpixel,
-#endif
-#ifdef UFRAW_CONTRAST
        &cmd->contrast,
-#endif
        &cmd->threshold,
        &cmd->exposure, &cmd->black, &interpolationName, &grayscaleName,
        &cmd->shrink, &cmd->size, &cmd->compression,
@@ -1723,12 +1691,8 @@
     cmd->silent=FALSE;
     cmd->profile[0][0].gamma=NULLF;
     cmd->profile[0][0].linear=NULLF;
-#ifdef UFRAW_HOTPIXELS
     cmd->hotpixel=NULLF;
-#endif
-#ifdef UFRAW_CONTRAST
     cmd->contrast=NULLF;
-#endif
     cmd->saturation=NULLF;
     cmd->black=NULLF;
     cmd->threshold=NULLF;
@@ -1765,12 +1729,8 @@
        case 'G':
        case 'L':
        case 's':
-#ifdef UFRAW_HOTPIXELS
        case 'H':
-#endif
-#ifdef UFRAW_CONTRAST
        case 'y':
-#endif
        case 'n':
            if (sscanf(optarg, "%lf", (double *)optPointer[index])==0) {
                ufraw_message(UFRAW_ERROR,

Index: ufraw_ufraw.c
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_ufraw.c,v
retrieving revision 1.197
retrieving revision 1.198
diff -u -d -r1.197 -r1.198
--- ufraw_ufraw.c       19 Oct 2009 13:00:10 -0000      1.197
+++ ufraw_ufraw.c       21 Oct 2009 14:00:20 -0000      1.198
@@ -706,9 +706,7 @@
 
 int ufraw_convert_image(ufraw_data *uf)
 {
-#ifdef UFRAW_HOTPIXELS
     uf->mark_hotpixels = FALSE;
-#endif
     ufraw_developer_prepare(uf, file_developer);
     ufraw_convert_image_init(uf);
     ufraw_convert_image_first_phase(uf, TRUE);
@@ -900,7 +898,6 @@
 
 #endif /* HAVE_LENSFUN */
 
-#ifdef UFRAW_HOTPIXELS
 /*
  * A pixel with a significantly larger value than all of its four direct
  * neighbours is considered "hot". It will be replaced by the maximum value
@@ -971,7 +968,6 @@
     }
     uf->hotpixels = count;
 }
-#endif
 
 /* This is the part of the conversion which is not supported by
  * ufraw_convert_image_area() */
@@ -990,10 +986,8 @@
     rawimage = raw->raw.image;
     raw->raw.image = g_memdup(rawimage, raw->raw.height * raw->raw.width *
            sizeof (dcraw_image_type));
-#ifdef UFRAW_HOTPIXELS
     ufraw_shave_hotpixels(uf, raw->raw.image, raw->raw.width, raw->raw.height,
            raw->raw.colors, raw->rgbMax);
-#endif
     if ( uf->ConvertShrink>1 || !uf->HaveFilters ) {
        dcraw_finalize_shrink(&final, raw, dark, uf->ConvertShrink);
        uf->developer->doWB = 1;

Index: ufraw_ui.h
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_ui.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- ufraw_ui.h  21 Oct 2009 01:34:49 -0000      1.25
+++ ufraw_ui.h  21 Oct 2009 14:00:21 -0000      1.26
@@ -60,21 +60,15 @@
     GtkTable *GrayscaleMixerTable;
     GtkLabel *GrayscaleMixerColor;
     GtkLabel *SpotPatch;
-#ifdef UFRAW_HOTPIXELS
     GtkLabel *HotpixelCount;
-#endif
     colorLabels *SpotLabels, *AvrLabels, *DevLabels, *OverLabels, *UnderLabels;
     GtkToggleButton *AutoExposureButton, *AutoBlackButton, *LockAspectButton;
     GtkWidget *AutoCurveButton;
     GtkWidget *ResetWBButton, *ResetGammaButton, *ResetLinearButton;
     GtkWidget *ResetExposureButton, *ResetSaturationButton;
     GtkWidget *ResetThresholdButton;
-#ifdef UFRAW_HOTPIXELS
     GtkWidget *ResetHotpixelButton;
-#endif
-#ifdef UFRAW_CONTRAST
     GtkWidget *ResetContrastButton;
-#endif
     GtkWidget *ResetBlackButton, *ResetBaseCurveButton, *ResetCurveButton;
     GtkWidget *ResetGrayscaleChannelMixerButton;
     GtkWidget *SaveButton;
@@ -97,13 +91,9 @@
     GtkAdjustment *LinearAdjustment;
     GtkAdjustment *ExposureAdjustment;
     GtkAdjustment *ThresholdAdjustment;
-#ifdef UFRAW_HOTPIXELS
     GtkAdjustment *HotpixelAdjustment;
-#endif
     GtkAdjustment *SaturationAdjustment;
-#ifdef UFRAW_CONTRAST
     GtkAdjustment *ContrastAdjustment;
-#endif
     GtkWidget *LightnessHueSelectNewButton;
     GtkTable *LightnessAdjustmentTable[max_adjustments];
     GtkAdjustment *LightnessAdjustment[max_adjustments];


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
ufraw-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ufraw-cvs

Reply via email to