From: Wei Xie xiewei@uniontech.com
Fixed potential image resampling conditions by using exact pixel coordinates --- dlls/gdiplus/graphics.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 8fa0d689cbe..6dd5a83092f 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -3260,8 +3260,8 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image graphics->scale, image->xres, image->yres, bitmap->format, imageAttributes ? imageAttributes->outside_color : 0);
- if (ptf[1].Y != ptf[0].Y || ptf[2].X != ptf[0].X || - ptf[1].X - ptf[0].X != srcwidth || ptf[2].Y - ptf[0].Y != srcheight || + if (pti[1].y != pti[0].y || pti[2].x != pti[0].x|| + pti[1].x - pti[0].x != gdip_round(srcwidth) || pti[2].y - pti[0].y != gdip_round(srcheight) || srcx < 0 || srcy < 0 || srcx + srcwidth > bitmap->width || srcy + srcheight > bitmap->height) do_resampling = TRUE;