mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-04-22 18:21:59 +03:00
cgetpixel_mb constant size buffer
This commit is contained in:
parent
76d336d21a
commit
ed15ed9737
|
@ -435,7 +435,8 @@ float16tofloat32(const FLOAT16 in) {
|
|||
|
||||
static inline PyObject *
|
||||
getpixel_mb(Imaging im, ImagingAccess access, int x, int y) {
|
||||
UINT8 pixel[im->pixelsize];
|
||||
UINT8 pixel[sizeof(INT32) * 6];
|
||||
assert(im->pixelsize <= sizeof(pixel));
|
||||
access->get_pixel(im, x, y, &pixel);
|
||||
|
||||
PyObject *tuple = PyTuple_New(im->bands);
|
||||
|
|
|
@ -198,7 +198,7 @@ ImagingNewPrologueSubtype(
|
|||
}
|
||||
im->bands = bands;
|
||||
im->depth = depth;
|
||||
im->pixelsize = depth * bands;
|
||||
im->pixelsize = depth / CHAR_BIT * bands;
|
||||
im->linesize = xsize * im->pixelsize;
|
||||
im->type = IMAGING_TYPE_MB;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user