Author: post
Date: 2012-10-29 16:56:09 +0100 (Mon, 29 Oct 2012)
New Revision: 4304

Modified:
   trunk/plugins/dcp/dcp.c
Log:
Fix curve histogram readout if no tone curve was used (ie. images without DCP 
profile).

Modified: trunk/plugins/dcp/dcp.c
===================================================================
--- trunk/plugins/dcp/dcp.c     2012-10-29 15:37:10 UTC (rev 4303)
+++ trunk/plugins/dcp/dcp.c     2012-10-29 15:56:09 UTC (rev 4304)
@@ -1207,11 +1207,11 @@
                        /* Curve */
                        if (dcp->read_out_curve)
                        {
-                               gfloat t1,t2,t3;
+                               gfloat t1 = v,t2,t3;
                                if (dcp->tone_curve_lut) 
                                {
-                                       t1 = t2 = t3 = v;
-                                       rgb_tone(&t1, &t1, &t3, 
dcp->tone_curve_lut);
+                                       t2 = t3 = v;
+                                       rgb_tone(&t1, &t2, &t3, 
dcp->tone_curve_lut);
                                }
                                int input = (int)(CLAMP(sqrtf(t1) * 256.0f, 
0.0f, 255.9999f));
                                t->curve_input_values[input]++;


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

Reply via email to