mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Do not read "resolution" parameter if it will not be used
This commit is contained in:
parent
be489287d2
commit
0d667f5e0b
|
@ -53,12 +53,12 @@ def _save(im, fp, filename, save_all=False):
|
|||
else:
|
||||
existing_pdf = PdfParser.PdfParser(f=fp, filename=filename, mode="w+b")
|
||||
|
||||
x_resolution = y_resolution = im.encoderinfo.get("resolution", 72.0)
|
||||
|
||||
dpi = im.encoderinfo.get("dpi")
|
||||
if dpi:
|
||||
x_resolution = dpi[0]
|
||||
y_resolution = dpi[1]
|
||||
else:
|
||||
x_resolution = y_resolution = im.encoderinfo.get("resolution", 72.0)
|
||||
|
||||
info = {
|
||||
"title": None
|
||||
|
|
Loading…
Reference in New Issue
Block a user