mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 10:46:16 +03:00
Map buffer into (0, 0) image
This commit is contained in:
parent
24606216e1
commit
51a6d45566
|
@ -3000,7 +3000,7 @@ def frombuffer(mode, size, data, decoder_name="raw", *args):
|
||||||
if args == ():
|
if args == ():
|
||||||
args = mode, 0, 1
|
args = mode, 0, 1
|
||||||
if args[0] in _MAPMODES:
|
if args[0] in _MAPMODES:
|
||||||
im = new(mode, (1, 1))
|
im = new(mode, (0, 0))
|
||||||
im = im._new(core.map_buffer(data, size, decoder_name, 0, args))
|
im = im._new(core.map_buffer(data, size, decoder_name, 0, args))
|
||||||
if mode == "P":
|
if mode == "P":
|
||||||
from . import ImagePalette
|
from . import ImagePalette
|
||||||
|
|
Loading…
Reference in New Issue
Block a user