Skip to content

Commit

Permalink
Merge pull request #1730 from radarhere/frombuffer_args
Browse files Browse the repository at this point in the history
Changed default frombuffer raw decoder args
  • Loading branch information
radarhere committed Oct 2, 2019
2 parents 91306df + 2f5e24d commit f92f429
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/PIL/Image.py
Expand Up @@ -2592,14 +2592,7 @@ def frombuffer(mode, size, data, decoder_name="raw", *args):

if decoder_name == "raw":
if args == ():
warnings.warn(
"the frombuffer defaults will change in Pillow 7.0.0; "
"for portability, change the call to read:\n"
" frombuffer(mode, size, data, 'raw', mode, 0, 1)",
RuntimeWarning,
stacklevel=2,
)
args = mode, 0, -1 # may change to (mode, 0, 1) post-1.1.6
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))
Expand Down

0 comments on commit f92f429

Please sign in to comment.