[Rawstudio-commit] r2204 - trunk/src
Anders Kvist
anders at kvistmail.dk
Wed Feb 18 23:34:46 CET 2009
Author: akv
Date: 2009-02-18 23:34:46 +0100 (Wed, 18 Feb 2009)
New Revision: 2204
Modified:
trunk/src/application.c
Log:
Same plugin-chain as used for preview.
Modified: trunk/src/application.c
===================================================================
--- trunk/src/application.c 2009-02-14 19:09:09 UTC (rev 2203)
+++ trunk/src/application.c 2009-02-18 22:34:46 UTC (rev 2204)
@@ -216,21 +216,19 @@
RSFilter *finput = rs_filter_new("RSInputImage16", NULL);
RSFilter *fdemosaic = rs_filter_new("RSDemosaic", finput);
- RSFilter *ftransform = rs_filter_new("RSTransform", fdemosaic);
- RSFilter *fsharpen = rs_filter_new("RSSharpen", ftransform);
+ RSFilter *frotate = rs_filter_new("RSRotate", fdemosaic);
+ RSFilter *fcrop = rs_filter_new("RSCrop", frotate);
+ RSFilter *fresample= rs_filter_new("RSResample", fcrop);
+ RSFilter *fsharpen= rs_filter_new("RSSharpen", fresample);
g_object_set(finput, "image", photo->input, NULL);
- g_object_get(ftransform, "actual_scale", &actual_scale, NULL);
+ g_object_set(frotate, "angle", photo->angle, "orientation", photo->orientation, NULL);
+ g_object_set(fcrop, "rectangle", photo->crop, NULL);
+ actual_scale = ((gdouble) width / (gdouble) rs_filter_get_width(finput));
g_object_set(fsharpen, "amount", actual_scale * photo->settings[snapshot]->sharpen, NULL);
- g_object_set(ftransform,
- "crop", photo->crop,
- "width", width,
- "height", height,
- "aspect", TRUE,
- "scale", scale,
- "angle", photo->angle,
- "orientation", photo->orientation,
- NULL);
+ g_object_set(fresample, "width", width, "height", height, NULL);
+
+
rsi = rs_filter_get_image(fsharpen);
if (cms)
@@ -308,8 +306,11 @@
}
g_object_unref(finput);
+ g_object_unref(fdemosaic);
+ g_object_unref(frotate);
+ g_object_unref(fcrop);
+ g_object_unref(fresample);
g_object_unref(fsharpen);
- g_object_unref(ftransform);
return(TRUE);
}
More information about the Rawstudio-commit
mailing list