Author: post
Date: 2010-11-28 18:21:43 +0100 (Sun, 28 Nov 2010)
New Revision: 3647
Modified:
trunk/src/application.c
trunk/src/rs-external-editor.c
Log:
Clean up export code.
Modified: trunk/src/application.c
===================================================================
--- trunk/src/application.c 2010-11-28 17:13:35 UTC (rev 3646)
+++ trunk/src/application.c 2010-11-28 17:21:43 UTC (rev 3647)
@@ -181,15 +181,16 @@
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);
- }
+ else
+ g_object_set(fdcp, "use-profile", FALSE, NULL);
+ /* Set image settings */
+ rs_filter_set_recursive(fend, "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-28 17:13:35 UTC (rev 3646)
+++ trunk/src/rs-external-editor.c 2010-11-28 17:21:43 UTC (rev 3647)
@@ -86,19 +86,20 @@
RSFilter *ftransform_display = rs_filter_new("RSColorspaceTransform",
fdenoise);
RSFilter *fend = ftransform_display;
- /* Set input profile */
- RSDcpFile *dcp_profile = rs_photo_get_dcp_profile(photo);
+ /* Set DCP profile - we do NOT set ICC profiles, since this will
already be set further up the chain */
+ 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);
- }
+ if (dcp_profile != NULL)
+ g_object_set(fdcp, "profile", dcp_profile, "use-profile", TRUE,
NULL);
+ else
+ g_object_set(fdcp, "use-profile", FALSE, NULL);
+ rs_filter_set_recursive(fdenoise, "settings",
photo->settings[snapshot], NULL);
+
output = rs_output_new("RSTifffile");
g_object_set(output, "filename", filename->str, NULL);
- rs_output_execute(output, fend);
+ rs_output_execute(output, fend);
g_object_unref(output);
g_object_unref(ftransform_display);
g_object_unref(fdenoise);
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit