From c1eb77a4ed331b10d8b44e9a8a4a003bb621a8ce Mon Sep 17 00:00:00 2001 From: homm Date: Sun, 19 Oct 2014 18:19:56 +0400 Subject: [PATCH] faster commit --- libImaging/BoxBlur.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/libImaging/BoxBlur.c b/libImaging/BoxBlur.c index 240716496..6a9155390 100644 --- a/libImaging/BoxBlur.c +++ b/libImaging/BoxBlur.c @@ -173,7 +173,7 @@ HorizontalBoxBlur(Imaging im, Imaging imOut, float floatRadius) { ImagingSectionCookie cookie; - int y, x; + int y; int radius = (int) floatRadius; UINT32 ww = (UINT32) (1 << 24) / (floatRadius * 2 + 1); @@ -202,9 +202,7 @@ HorizontalBoxBlur(Imaging im, Imaging imOut, float floatRadius) ); if (im == imOut) { // Commit. - for (x = 0; x < im->xsize; x++) { - imOut->image8[y][x] = ((UINT8 *)lineOut)[x]; - } + memcpy(imOut->image8[y], lineOut, im->xsize); } } } @@ -220,9 +218,7 @@ HorizontalBoxBlur(Imaging im, Imaging imOut, float floatRadius) ); if (im == imOut) { // Commit. - for (x = 0; x < im->xsize; x++) { - imOut->image32[y][x] = lineOut[x]; - } + memcpy(imOut->image32[y], lineOut, im->xsize * 4); } } }