mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
extents are not used by map_buffer
This commit is contained in:
parent
4b626ea14a
commit
6a7ac38c6c
|
@ -2634,7 +2634,7 @@ def frombuffer(mode, size, data, decoder_name="raw", *args):
|
|||
args = mode, 0, 1
|
||||
if args[0] in _MAPMODES:
|
||||
im = new(mode, (1, 1))
|
||||
im = im._new(core.map_buffer(data, size, decoder_name, None, 0, args))
|
||||
im = im._new(core.map_buffer(data, size, decoder_name, 0, args))
|
||||
im.readonly = 1
|
||||
return im
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ class ImageFile(Image.Image):
|
|||
fp.fileno(), 0, access=mmap.ACCESS_READ
|
||||
)
|
||||
self.im = Image.core.map_buffer(
|
||||
self.map, self.size, decoder_name, extents, offset, args
|
||||
self.map, self.size, decoder_name, offset, args
|
||||
)
|
||||
readonly = 1
|
||||
# After trashing self.im,
|
||||
|
|
|
@ -313,14 +313,13 @@ PyImaging_MapBuffer(PyObject* self, PyObject* args)
|
|||
Py_buffer view;
|
||||
char* mode;
|
||||
char* codec;
|
||||
PyObject* bbox;
|
||||
Py_ssize_t offset;
|
||||
int xsize, ysize;
|
||||
int stride;
|
||||
int ystep;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O(ii)sOn(sii)", &target, &xsize, &ysize,
|
||||
&codec, &bbox, &offset, &mode, &stride, &ystep))
|
||||
if (!PyArg_ParseTuple(args, "O(ii)sn(sii)", &target, &xsize, &ysize,
|
||||
&codec, &offset, &mode, &stride, &ystep))
|
||||
return NULL;
|
||||
|
||||
if (!PyImaging_CheckBuffer(target)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user