mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-14 17:24:46 +03:00
fix pixelsize=2 imOut offsets in ImagingReduceCorners()
This commit is contained in:
parent
87e9ab01fe
commit
0d56474150
|
@ -1157,8 +1157,8 @@ ImagingReduceCorners(Imaging imOut, Imaging imIn, int box[4], int xscale, int ys
|
|||
ss1 += line[xx * 2 + 1];
|
||||
}
|
||||
}
|
||||
((UINT8 *)imOut->image[y])[x + 0] = (ss0 * multiplier) >> 24;
|
||||
((UINT8 *)imOut->image[y])[x + 1] = (ss1 * multiplier) >> 24;
|
||||
((UINT8 *)imOut->image[y])[x * 2 + 0] = (ss0 * multiplier) >> 24;
|
||||
((UINT8 *)imOut->image[y])[x * 2 + 1] = (ss1 * multiplier) >> 24;
|
||||
}
|
||||
}
|
||||
if (box[3] % yscale) {
|
||||
|
@ -1176,8 +1176,8 @@ ImagingReduceCorners(Imaging imOut, Imaging imIn, int box[4], int xscale, int ys
|
|||
ss1 += line[xx * 2 + 1];
|
||||
}
|
||||
}
|
||||
((UINT8 *)imOut->image[y])[x + 0] = (ss0 * multiplier) >> 24;
|
||||
((UINT8 *)imOut->image[y])[x + 1] = (ss1 * multiplier) >> 24;
|
||||
((UINT8 *)imOut->image[y])[x * 2 + 0] = (ss0 * multiplier) >> 24;
|
||||
((UINT8 *)imOut->image[y])[x * 2 + 1] = (ss1 * multiplier) >> 24;
|
||||
}
|
||||
}
|
||||
if (box[2] % xscale && box[3] % yscale) {
|
||||
|
@ -1194,8 +1194,8 @@ ImagingReduceCorners(Imaging imOut, Imaging imIn, int box[4], int xscale, int ys
|
|||
ss1 += line[xx * 2 + 1];
|
||||
}
|
||||
}
|
||||
((UINT8 *)imOut->image[y])[x + 0] = (ss0 * multiplier) >> 24;
|
||||
((UINT8 *)imOut->image[y])[x + 1] = (ss1 * multiplier) >> 24;
|
||||
((UINT8 *)imOut->image[y])[x * 2 + 0] = (ss0 * multiplier) >> 24;
|
||||
((UINT8 *)imOut->image[y])[x * 2 + 1] = (ss1 * multiplier) >> 24;
|
||||
}
|
||||
} else if (imIn->pixelsize == 4) {
|
||||
if (box[2] % xscale) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user