Author: post
Date: 2010-11-18 22:13:11 +0100 (Thu, 18 Nov 2010)
New Revision: 3629

Modified:
   trunk/src/application.c
   trunk/src/rs-external-editor.c
Log:
Export: Add settings to all filters - don't add unused resample filter when 
exporting to GIMP.

Modified: trunk/src/application.c
===================================================================
--- trunk/src/application.c     2010-11-16 18:43:54 UTC (rev 3628)
+++ trunk/src/application.c     2010-11-18 21:13:11 UTC (rev 3629)
@@ -181,13 +181,14 @@
        if (0 < width && 0 < height) /* We only wan't to set width and height 
if they are not -1 */
                rs_filter_set_recursive(fend, "width", width, "height", height, 
NULL);
 
+       rs_filter_set_recursive(fend, "settings", photo->settings[snapshot], 
NULL);
+
        /* Set dcp profile */
        RSDcpFile *dcp_profile  = rs_photo_get_dcp_profile(photo);
        if (dcp_profile != NULL)
        {
                g_object_set(fdcp, "profile", dcp_profile, "use-profile", TRUE, 
NULL);
        }
-       g_object_set(fdcp, "settings", photo->settings[snapshot], NULL);
 
        /* actually save */
        gboolean exported = rs_output_execute(output, fend);

Modified: trunk/src/rs-external-editor.c
===================================================================
--- trunk/src/rs-external-editor.c      2010-11-16 18:43:54 UTC (rev 3628)
+++ trunk/src/rs-external-editor.c      2010-11-18 21:13:11 UTC (rev 3629)
@@ -81,8 +81,7 @@
         g_string_printf(filename, "%s/.rawstudio_%.0f.tif",g_get_tmp_dir(), 
g_random_double()*10000);
 
        /* Setup our filter chain for saving */
-       RSFilter *fresample= rs_filter_new("RSResample", prior_to_resample);
-        RSFilter *fdcp = rs_filter_new("RSDcp", fresample);
+        RSFilter *fdcp = rs_filter_new("RSDcp", prior_to_resample);
         RSFilter *fdenoise= rs_filter_new("RSDenoise", fdcp);
         RSFilter *ftransform_display = rs_filter_new("RSColorspaceTransform", 
fdenoise);
         RSFilter *fend = ftransform_display;
@@ -90,19 +89,18 @@
         /* Set input profile */
         RSDcpFile *dcp_profile  = rs_photo_get_dcp_profile(photo);
 
+       rs_filter_set_recursive(fend, "settings", photo->settings[snapshot], 
NULL);
         if (dcp_profile != NULL)
         {
                 g_object_set(fdcp, "profile", dcp_profile, "use-profile", 
TRUE, NULL);
         }
 
-        g_object_set(fdcp, "settings", photo->settings[snapshot],NULL);
 
        output = rs_output_new("RSTifffile");
        g_object_set(output, "filename", filename->str, NULL);
         rs_output_execute(output, fend);
        g_object_unref(output);
        g_object_unref(ftransform_display);
-       g_object_unref(fresample);
        g_object_unref(fdenoise);
        g_object_unref(fdcp);
 


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

Reply via email to