Author: akv
Date: 2012-10-28 21:39:21 +0100 (Sun, 28 Oct 2012)
New Revision: 4297

Modified:
   trunk/src/application.c
   trunk/src/application.h
Log:
Removed old code for autolevels (curve adjust ends).

Modified: trunk/src/application.c
===================================================================
--- trunk/src/application.c     2012-10-28 19:11:44 UTC (rev 4296)
+++ trunk/src/application.c     2012-10-28 20:39:21 UTC (rev 4297)
@@ -228,43 +228,6 @@
        return(rs);
 }
 
-void
-rs_white_black_point(RS_BLOB *rs)
-{
-       if (rs->photo)
-       {
-               guint hist[4][256] = {{0,}};
-               gint i = 0;
-               gdouble black_threshold = 0.003; // Percent underexposed pixels
-               gdouble white_threshold = 0.01; // Percent overexposed pixels
-               gdouble blackpoint;
-               gdouble whitepoint;
-               guint total = 0;
-
-               // calculate black point
-               while(i < 256) {
-                       total += hist[R][i]+hist[G][i]+hist[B][i];
-                       if ((total/3) > ((250*250*3)/100*black_threshold))
-                               break;
-                       i++;
-               }
-               blackpoint = (gdouble) i / (gdouble) 255;
-               
-               // calculate white point
-               i = 255;
-               while(i) {
-                       total += hist[R][i]+hist[G][i]+hist[B][i];
-                       if ((total/3) > ((250*250*3)/100*white_threshold))
-                               break;
-                       i--;
-               }
-               whitepoint = (gdouble) i / (gdouble) 255;
-
-               
rs_curve_widget_move_knot(RS_CURVE_WIDGET(rs->curve[rs->current_setting]),0,blackpoint,0.0);
-               
rs_curve_widget_move_knot(RS_CURVE_WIDGET(rs->curve[rs->current_setting]),-1,whitepoint,1.0);
-       }
-}
-
 gboolean
 test_dcp_profile(RSProfileFactory *factory, gchar *make_ascii, gchar 
*model_ascii)
 {

Modified: trunk/src/application.h
===================================================================
--- trunk/src/application.h     2012-10-28 19:11:44 UTC (rev 4296)
+++ trunk/src/application.h     2012-10-28 20:39:21 UTC (rev 4297)
@@ -72,7 +72,6 @@
        RSSettings *settings_buffer;
        RSDcpFile *dcp_buffer;
        RSIccProfile *icc_buffer;
-       GtkWidget *curve[3];
        gint current_setting;
        RS_QUEUE *queue;
        RSStore *store;


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to