Author: post
Date: 2010-11-08 19:09:15 +0100 (Mon, 08 Nov 2010)
New Revision: 3612

Modified:
   trunk/plugins/dcp/dcp.c
Log:
Align ROI properly, and remove notice.

Modified: trunk/plugins/dcp/dcp.c
===================================================================
--- trunk/plugins/dcp/dcp.c     2010-11-08 18:08:17 UTC (rev 3611)
+++ trunk/plugins/dcp/dcp.c     2010-11-08 18:09:15 UTC (rev 3612)
@@ -505,11 +505,11 @@
 
        if ((roi = rs_filter_request_get_roi(request)))
        {
+               /* Align so we start at even pixel counts */
+               roi->width += (roi->x&1);
+               roi->x -= (roi->x&1);
                output = rs_image16_copy(input, FALSE);
                tmp = rs_image16_new_subframe(output, roi);
-               /* Please note - the following is not completely correct, since 
subframe above may */
-               /* adjust the x alignment on the subframe it returns */
-               /* This will make multiple roi calls not align up as you would 
expect */
                bit_blt((char*)GET_PIXEL(tmp,0,0), tmp->rowstride * 2, 
                        (const char*)GET_PIXEL(input,roi->x,roi->y), 
input->rowstride * 2, tmp->rowstride * 2, tmp->h);
        }


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

Reply via email to