mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-30 18:03:07 +03:00
Do not use lineOut buffer if source and destination are different.
This commit is contained in:
parent
5ab12e0ee7
commit
f55ea4c04c
|
@ -195,14 +195,16 @@ HorizontalBoxBlur(Imaging im, Imaging imOut, float floatRadius)
|
||||||
for (y = 0; y < im->ysize; y++) {
|
for (y = 0; y < im->ysize; y++) {
|
||||||
LineBoxBlur8(
|
LineBoxBlur8(
|
||||||
im->image8[y],
|
im->image8[y],
|
||||||
(UINT8 *) lineOut,
|
(im == imOut ? (UINT8 *) lineOut : imOut->image8[y]),
|
||||||
im->xsize - 1,
|
im->xsize - 1,
|
||||||
radius, edgeA, edgeB,
|
radius, edgeA, edgeB,
|
||||||
ww, fw
|
ww, fw
|
||||||
);
|
);
|
||||||
// Commit.
|
if (im == imOut) {
|
||||||
for (x = 0; x < im->xsize; x++) {
|
// Commit.
|
||||||
imOut->image8[y][x] = ((UINT8 *)lineOut)[x];
|
for (x = 0; x < im->xsize; x++) {
|
||||||
|
imOut->image8[y][x] = ((UINT8 *)lineOut)[x];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -211,14 +213,16 @@ HorizontalBoxBlur(Imaging im, Imaging imOut, float floatRadius)
|
||||||
for (y = 0; y < im->ysize; y++) {
|
for (y = 0; y < im->ysize; y++) {
|
||||||
LineBoxBlur32(
|
LineBoxBlur32(
|
||||||
(pixel *) im->image32[y],
|
(pixel *) im->image32[y],
|
||||||
lineOut,
|
im == imOut ? lineOut : (UINT32 *) imOut->image32[y],
|
||||||
im->xsize - 1,
|
im->xsize - 1,
|
||||||
radius, edgeA, edgeB,
|
radius, edgeA, edgeB,
|
||||||
ww, fw
|
ww, fw
|
||||||
);
|
);
|
||||||
// Commit.
|
if (im == imOut) {
|
||||||
for (x = 0; x < im->xsize; x++) {
|
// Commit.
|
||||||
imOut->image32[y][x] = lineOut[x];
|
for (x = 0; x < im->xsize; x++) {
|
||||||
|
imOut->image32[y][x] = lineOut[x];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user