(im, fill_color=(0, 0, 0, 0))
| 19 | """ |
| 20 | |
| 21 | def make_square(im, fill_color=(0, 0, 0, 0)): |
| 22 | x, y = im.size |
| 23 | size = max(x, y) |
| 24 | new_im = Image.new('RGBA', (size, size), fill_color) |
| 25 | new_im.paste(im, (int((size - x) / 2), int((size - y) / 2))) |
| 26 | return new_im |
| 27 | |
| 28 | |
| 29 |