135
136 with Image.open(input_img) as img:
137 # We used to use thumbnail(size) here, but it returns with a *max* dimension of 512,512
138 # rather than making one side exactly 512 so we have to calculate dimensions manually :(139 if img.width == img.height:
140 size = (512, 512)
141 elif img.width < img.height:
134 output.name = f"sticker.{img_type.lower()}"
135
136 with Image.open(input_img) as img:
137 # We used to use thumbnail(size) here, but it returns with a *max* dimension of 512,512138 # rather than making one side exactly 512 so we have to calculate dimensions manually :(
139 if img.width == img.height:
140 size = (512, 512)
Docstring line lengths are recommended to be no greater than 79 characters.