Skip to content

Commit

Permalink
Merge pull request #7359 from radarhere/frombuffer
Browse files Browse the repository at this point in the history
Map buffer into (0, 0) image
  • Loading branch information
radarhere authored Sep 4, 2023
2 parents 601324b + 51a6d45 commit 2f9ef61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PIL/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -3000,7 +3000,7 @@ def frombuffer(mode, size, data, decoder_name="raw", *args):
if args == ():
args = mode, 0, 1
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))
if mode == "P":
from . import ImagePalette
Expand Down

0 comments on commit 2f9ef61

Please sign in to comment.