From 51a6d45566c4ee091ebf17b208a87f166c5932a6 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 31 Aug 2023 16:31:45 +1000 Subject: [PATCH] Map buffer into (0, 0) image --- src/PIL/Image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PIL/Image.py b/src/PIL/Image.py index 6ea711b565a..9bf293d13e8 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -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