Author: akv
Date: 2010-02-14 16:22:54 +0100 (Sun, 14 Feb 2010)
New Revision: 3223

Modified:
   trunk/src/rs-batch.c
Log:
Defaulting to sRGB input profile if no DCP or ICC profile is in use.

Modified: trunk/src/rs-batch.c
===================================================================
--- trunk/src/rs-batch.c        2010-02-14 15:07:41 UTC (rev 3222)
+++ trunk/src/rs-batch.c        2010-02-14 15:22:54 UTC (rev 3223)
@@ -516,12 +516,24 @@
                        g_string_append(filename, 
rs_output_get_extension(queue->output));
                        parsed_filename = filename_parse(filename->str, 
filename_in, setting_id);
 
-                       /* Set DCP profile */
+                       /* Set input profile */
                        RSDcpFile *dcp_profile  = 
rs_photo_get_dcp_profile(photo);
+                       RSIccProfile *icc_profile  = 
rs_photo_get_icc_profile(photo);
+
                        if (dcp_profile != NULL)
                        {
                                g_object_set(fdcp, "profile", dcp_profile, 
NULL);
                        }
+                       else if (icc_profile != NULL)
+                       {
+                               RSColorSpace *icc_space = 
rs_color_space_icc_new_from_icc(icc_profile);
+                               g_object_set(finput, "color-space", icc_space, 
NULL);
+                       }
+                       else if (icc_profile == NULL)
+                       {
+                               RSColorSpace *icc_space = 
rs_color_space_icc_new_from_file(PACKAGE_DATA_DIR "/" PACKAGE 
"/profiles/sRGB.icc");
+                               g_object_set(finput, "color-space", icc_space, 
NULL);
+                       }
 
                        rs_filter_set_recursive(fend,
                                "image", photo->input,


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

Reply via email to