[Rawstudio-commit] r3870 - trunk/plugins/dcp

Klaus Post klauspost at gmail.com
Sun Mar 13 14:45:07 CET 2011


Author: post
Date: 2011-03-13 14:45:07 +0100 (Sun, 13 Mar 2011)
New Revision: 3870

Modified:
   trunk/plugins/dcp/dcp.c
Log:
Clampt warmth and tint after calculation.

Modified: trunk/plugins/dcp/dcp.c
===================================================================
--- trunk/plugins/dcp/dcp.c	2011-03-13 13:43:51 UTC (rev 3869)
+++ trunk/plugins/dcp/dcp.c	2011-03-13 13:45:07 UTC (rev 3870)
@@ -197,6 +197,8 @@
 			neutral.z = neutral.z / max;
 			whitepoint = neutral_to_xy(dcp, &neutral);
 			rs_color_whitepoint_to_temp(&whitepoint, &dcp->warmth, &dcp->tint);
+			dcp->warmth = CLAMP(dcp->warmth, 2000, 12000);
+			dcp->tint = CLAMP(dcp->tint, -150, 150);
 			g_object_set(settings,
 				"dcp-temp", dcp->warmth,
 				"dcp-tint", dcp->tint,




More information about the Rawstudio-commit mailing list