gdiplus: When copying an image do not round pixel positions up.
Dmitry Timoshkov
dmitry at baikal.ru
Mon Aug 27 19:36:27 CDT 2012
That creates broken right/bottom image borders when copying an image with
a graphics transform because rounding up leads to an out of bounds source
pixel position, and in that case attributes->outside_color is used instead.
This patch fixes corrupted right/bottom image borders in an application
I'm working on.
---
dlls/gdiplus/graphics.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index a0c130e..9415f36 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -877,7 +877,7 @@ static ARGB resample_bitmap_pixel(GDIPCONST GpRect *src_rect, LPBYTE bits, UINT
}
case InterpolationModeNearestNeighbor:
return sample_bitmap_pixel(src_rect, bits, width, height,
- gdip_round(point->X), gdip_round(point->Y), attributes);
+ point->X, point->Y, attributes);
}
}
--
1.7.11.5
More information about the wine-patches
mailing list