Remove extra space accidently added (learned you can put spaces after periods in Python?)

This commit is contained in:
PySimpleGUI 2023-10-05 16:26:20 -04:00
parent 3776730709
commit 7f485c5f78
7 changed files with 9 additions and 9 deletions

View File

@ -92,7 +92,7 @@ def convert_to_bytes(file_or_bytes, resize=None, fill=False):
if resize: if resize:
new_width, new_height = resize new_width, new_height = resize
scale = min(new_height / cur_height, new_width / cur_width) scale = min(new_height / cur_height, new_width / cur_width)
img = img.resize((int(cur_width * scale), int(cur_height * scale)), PIL. Image.LANCZOS) img = img.resize((int(cur_width * scale), int(cur_height * scale)), PIL.Image.LANCZOS)
if fill: if fill:
if resize is not None: if resize is not None:
img = make_square(img, resize[0]) img = make_square(img, resize[0])

View File

@ -44,7 +44,7 @@ def convert_to_bytes(file_or_bytes, resize=None):
if resize: if resize:
new_width, new_height = resize new_width, new_height = resize
scale = min(new_height/cur_height, new_width/cur_width) scale = min(new_height/cur_height, new_width/cur_width)
img = img.resize((int(cur_width*scale), int(cur_height*scale)), PIL. Image.LANCZOS) img = img.resize((int(cur_width*scale), int(cur_height*scale)), PIL.Image.LANCZOS)
bio = io.BytesIO() bio = io.BytesIO()
img.save(bio, format="PNG") img.save(bio, format="PNG")
del img del img

View File

@ -45,7 +45,7 @@ def convert_to_bytes(file_or_bytes, resize=None):
if resize: if resize:
new_width, new_height = resize new_width, new_height = resize
scale = min(new_height/cur_height, new_width/cur_width) scale = min(new_height/cur_height, new_width/cur_width)
img = img.resize((int(cur_width*scale), int(cur_height*scale)), PIL. Image.LANCZOS) img = img.resize((int(cur_width*scale), int(cur_height*scale)), PIL.Image.LANCZOS)
with io.BytesIO() as bio: with io.BytesIO() as bio:
img.save(bio, format="PNG") img.save(bio, format="PNG")
del img del img

View File

@ -56,7 +56,7 @@ def convert_to_bytes(file_or_bytes, resize=None, fill=False):
if resize: if resize:
new_width, new_height = resize new_width, new_height = resize
scale = min(new_height / cur_height, new_width / cur_width) scale = min(new_height / cur_height, new_width / cur_width)
img = img.resize((int(cur_width * scale), int(cur_height * scale)), PIL. Image.LANCZOS) img = img.resize((int(cur_width * scale), int(cur_height * scale)), PIL.Image.LANCZOS)
if fill: if fill:
img = make_square(img, THUMBNAIL_SIZE[0]) img = make_square(img, THUMBNAIL_SIZE[0])
with io.BytesIO() as bio: with io.BytesIO() as bio:

View File

@ -890,7 +890,7 @@ def convert_to_bytes(file_or_bytes, resize=None):
if resize: if resize:
new_width, new_height = resize new_width, new_height = resize
scale = min(new_height/cur_height, new_width/cur_width) scale = min(new_height/cur_height, new_width/cur_width)
img = img.resize((int(cur_width*scale), int(cur_height*scale)), PIL. Image.LANCZOS) img = img.resize((int(cur_width*scale), int(cur_height*scale)), PIL.Image.LANCZOS)
with io.BytesIO() as bio: with io.BytesIO() as bio:
img.save(bio, format="PNG") img.save(bio, format="PNG")
del img del img

View File

@ -59,7 +59,7 @@ def convert_to_bytes(file_or_bytes, resize=None):
if resize: if resize:
new_width, new_height = resize new_width, new_height = resize
scale = min(new_height / cur_height, new_width / cur_width) scale = min(new_height / cur_height, new_width / cur_width)
img = img.resize((int(cur_width * scale), int(cur_height * scale)), PIL. Image.LANCZOS) img = img.resize((int(cur_width * scale), int(cur_height * scale)), PIL.Image.LANCZOS)
with io.BytesIO() as bio: with io.BytesIO() as bio:
img.save(bio, format="PNG") img.save(bio, format="PNG")
del img del img
@ -80,7 +80,7 @@ def convert_to_bytes(file_or_bytes, resize=None):
def set_image_to_blank(key): def set_image_to_blank(key):
img = PIL.Image.new('RGB', (100, 100), (255, 255, 255)) img = PIL.Image.new('RGB', (100, 100), (255, 255, 255))
img.thumbnail((1, 1), PIL. Image.LANCZOS) img.thumbnail((1, 1), PIL.Image.LANCZOS)
bio = io.BytesIO() bio = io.BytesIO()
img.save(bio, format='PNG') img.save(bio, format='PNG')
imgbytes = bio.getvalue() imgbytes = bio.getvalue()

View File

@ -2664,7 +2664,7 @@ def convert_to_bytes(file_or_bytes, resize=None):
if resize: if resize:
new_width, new_height = resize new_width, new_height = resize
scale = min(new_height/cur_height, new_width/cur_width) scale = min(new_height/cur_height, new_width/cur_width)
img = img.resize((int(cur_width*scale), int(cur_height*scale)), PIL. Image.LANCZOS) img = img.resize((int(cur_width*scale), int(cur_height*scale)), PIL.Image.LANCZOS)
bio = io.BytesIO() bio = io.BytesIO()
img.save(bio, format="PNG") img.save(bio, format="PNG")
del img del img
@ -2747,7 +2747,7 @@ def convert_to_bytes(file_or_bytes, resize=None):
if resize: if resize:
new_width, new_height = resize new_width, new_height = resize
scale = min(new_height/cur_height, new_width/cur_width) scale = min(new_height/cur_height, new_width/cur_width)
img = img.resize((int(cur_width*scale), int(cur_height*scale)), PIL. Image.LANCZOS) img = img.resize((int(cur_width*scale), int(cur_height*scale)), PIL.Image.LANCZOS)
bio = io.BytesIO() bio = io.BytesIO()
img.save(bio, format="PNG") img.save(bio, format="PNG")
del img del img