Author: post
Date: 2010-12-20 00:01:46 +0100 (Mon, 20 Dec 2010)
New Revision: 3695

Modified:
   trunk/src/rs-batch.c
Log:
Use display colorspace for batch export preview.

Modified: trunk/src/rs-batch.c
===================================================================
--- trunk/src/rs-batch.c        2010-12-19 22:56:06 UTC (rev 3694)
+++ trunk/src/rs-batch.c        2010-12-19 23:01:46 UTC (rev 3695)
@@ -409,7 +409,14 @@
        RSFilter *ftransform_display = rs_filter_new("RSColorspaceTransform", 
fdenoise);
        RSFilter *fend = ftransform_display;
        RSFilterResponse *filter_response;
+       RSColorSpace *display_color_space;
+       gchar* cs_name;
 
+       if ((cs_name = rs_conf_get_string("display-colorspace")))
+               display_color_space = rs_color_space_new_singleton(cs_name);
+       else
+               display_color_space = rs_color_space_new_singleton("RSSrgb");
+
        /* FIXME: This is just a temporary hack to make batch work */
 #if 0
        {
@@ -590,7 +597,8 @@
                        RSFilterRequest *request = rs_filter_request_new();
                        rs_filter_request_set_quick(RS_FILTER_REQUEST(request), 
FALSE);
                        /* FIXME: Should be set to output colorspace, not 
forced to sRGB */
-                       rs_filter_param_set_object(RS_FILTER_PARAM(request), 
"colorspace", rs_color_space_new_singleton("RSSrgb"));     
+
+                       rs_filter_param_set_object(RS_FILTER_PARAM(request), 
"colorspace", display_color_space);        
                        filter_response = rs_filter_get_image8(fend, request);
                        pixbuf = rs_filter_response_get_image8(filter_response);
                        if (pixbuf)


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

Reply via email to