mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-11 17:56:18 +03:00
Minor improvement, one less copy
This commit is contained in:
parent
88fca0f555
commit
e88e90b8ed
|
@ -357,7 +357,7 @@ def _save(im, fp, filename, save_all=False):
|
||||||
fp.write(s)
|
fp.write(s)
|
||||||
else:
|
else:
|
||||||
# delta frame
|
# delta frame
|
||||||
delta = ImageChops.subtract_modulo(im_frame, previous)
|
delta = ImageChops.subtract_modulo(im_frame, previous.copy())
|
||||||
bbox = delta.getbbox()
|
bbox = delta.getbbox()
|
||||||
|
|
||||||
if bbox:
|
if bbox:
|
||||||
|
@ -368,7 +368,7 @@ def _save(im, fp, filename, save_all=False):
|
||||||
else:
|
else:
|
||||||
# FIXME: what should we do in this case?
|
# FIXME: what should we do in this case?
|
||||||
pass
|
pass
|
||||||
previous = im_frame.copy()
|
previous = im_frame
|
||||||
else:
|
else:
|
||||||
header = getheader(im_out, palette, im.encoderinfo)[0]
|
header = getheader(im_out, palette, im.encoderinfo)[0]
|
||||||
for s in header:
|
for s in header:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user