Author: abrander
Date: 2009-08-01 13:48:14 +0200 (Sat, 01 Aug 2009)
New Revision: 2597

Modified:
   trunk/src/rs-batch.c
   trunk/src/rs-save-dialog.c
Log:
Made icc-profile fallback work as expected when saving.

Modified: trunk/src/rs-batch.c
===================================================================
--- trunk/src/rs-batch.c        2009-07-19 18:50:55 UTC (rev 2596)
+++ trunk/src/rs-batch.c        2009-08-01 11:48:14 UTC (rev 2597)
@@ -405,7 +405,9 @@
 
        /* FIXME: This is just a temporary hack to make batch work */
        {
-               RSIccProfile *profile = NULL;
+               RSIccProfile *profile;
+
+               profile = NULL;
                gchar *profile_filename = 
rs_conf_get_cms_profile(CMS_PROFILE_INPUT);
                if (profile_filename)
                {
@@ -417,13 +419,14 @@
            g_object_set(finput, "icc-profile", profile, NULL);
            g_object_unref(profile);
 
+               profile = NULL;
                profile_filename = rs_conf_get_cms_profile(CMS_PROFILE_EXPORT);
                if (profile_filename)
                {
                        profile = 
rs_icc_profile_new_from_file(profile_filename);
                        g_free(profile_filename);
                }
-               else
+               if (!profile)
                        profile = rs_icc_profile_new_from_file(PACKAGE_DATA_DIR 
"/" PACKAGE "/profiles/sRGB.icc");
                g_object_set(fbasic_render, "icc-profile", profile, NULL);
            g_object_unref(profile);

Modified: trunk/src/rs-save-dialog.c
===================================================================
--- trunk/src/rs-save-dialog.c  2009-07-19 18:50:55 UTC (rev 2596)
+++ trunk/src/rs-save-dialog.c  2009-08-01 11:48:14 UTC (rev 2597)
@@ -154,10 +154,11 @@
        dialog->filter_denoise = rs_filter_new("RSDenoise", 
dialog->filter_resample);
        dialog->filter_basic_render = rs_filter_new("RSBasicRender", 
dialog->filter_denoise);
 
-       RSIccProfile *profile = NULL;
+       RSIccProfile *profile;
        gchar *filename;
 
        /* Set input ICC profile */
+       profile = NULL;
        filename = rs_conf_get_cms_profile(CMS_PROFILE_INPUT);
        if (filename)
        {
@@ -170,6 +171,7 @@
        g_object_unref(profile);
 
        /* Set output ICC profile */
+       profile = NULL;
        filename = rs_conf_get_cms_profile(CMS_PROFILE_EXPORT);
        if (filename)
        {


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

Reply via email to