Author: abrander
Date: 2009-12-01 00:14:20 +0100 (Tue, 01 Dec 2009)
New Revision: 2772
Modified:
trunk/plugins/dcp/dcp.c
Log:
RSDcp now uses rs_filter_param_set_object() to tell about it's output color
space.
Modified: trunk/plugins/dcp/dcp.c
===================================================================
--- trunk/plugins/dcp/dcp.c 2009-11-30 23:06:02 UTC (rev 2771)
+++ trunk/plugins/dcp/dcp.c 2009-11-30 23:14:20 UTC (rev 2772)
@@ -104,7 +104,7 @@
struct _RSDcpClass {
RSFilterClass parent_class;
-
+ RSColorSpace *prophoto;
RSIccProfile *prophoto_profile;
};
@@ -284,12 +284,18 @@
static void
rs_dcp_init(RSDcp *dcp)
{
+ RSDcpClass *klass = RS_DCP_GET_CLASS(dcp);
gint i;
dcp->curve_samples = g_new(gfloat, 65536);
for(i=0;i<65536;i++)
dcp->curve_samples[i] = ((gfloat)i)/65536.0;
+
+ /* We cannot initialize this in class init, the RSProphoto plugin may
not
+ * be loaded yet at that time :( */
+ if (!klass->prophoto)
+ klass->prophoto = rs_color_space_new_singleton("RSProphoto");
}
static void
@@ -383,6 +389,7 @@
get_image(RSFilter *filter, const RSFilterRequest *request)
{
RSDcp *dcp = RS_DCP(filter);
+ RSDcpClass *klass = RS_DCP_GET_CLASS(dcp);
GdkRectangle *roi;
RSFilterResponse *previous_response;
RSFilterResponse *response;
@@ -398,6 +405,9 @@
input = rs_filter_response_get_image(previous_response);
if (!input) return previous_response;
response = rs_filter_response_clone(previous_response);
+
+ /* We always deliver in ProPhoto */
+ rs_filter_param_set_object(RS_FILTER_PARAM(response), "colorspace",
klass->prophoto);
g_object_unref(previous_response);
output = rs_image16_copy(input, TRUE);
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit