[Rawstudio-commit] r2752 - trunk/plugins/resample
Klaus Post
klauspost at gmail.com
Sun Nov 22 16:19:11 CET 2009
Author: post
Date: 2009-11-22 16:19:10 +0100 (Sun, 22 Nov 2009)
New Revision: 2752
Modified:
trunk/plugins/resample/resample.c
Log:
Resampler: Don't remove ROI, if no resampling takes place.
Modified: trunk/plugins/resample/resample.c
===================================================================
--- trunk/plugins/resample/resample.c 2009-11-22 15:17:27 UTC (rev 2751)
+++ trunk/plugins/resample/resample.c 2009-11-22 15:19:10 UTC (rev 2752)
@@ -289,6 +289,15 @@
gint input_width = rs_filter_get_width(filter->previous);
gint input_height = rs_filter_get_height(filter->previous);
+
+ /* Return the input, if the new size is uninitialized */
+ if ((resample->new_width == -1) || (resample->new_height == -1))
+ return rs_filter_get_image(filter->previous, request);
+
+ /* Simply return the input, if we don't scale */
+ if ((input_width == resample->new_width) && (input_height == resample->new_height))
+ return rs_filter_get_image(filter->previous, request);
+
/* Remove ROI, it doesn't make sense across resampler */
if (rs_filter_request_get_roi(request))
{
@@ -300,14 +309,6 @@
else
previous_response = rs_filter_get_image(filter->previous, request);
- /* Return the input, if the new size is uninitialized */
- if ((resample->new_width == -1) || (resample->new_height == -1))
- return previous_response;
-
- /* Simply return the input, if we don't scale */
- if ((input_width == resample->new_width) && (input_height == resample->new_height))
- return previous_response;
-
input = rs_filter_response_get_image(previous_response);
if (!RS_IS_IMAGE16(input))
More information about the Rawstudio-commit
mailing list