Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
PososikTeam committed Sep 18, 2022
1 parent d80aa74 commit d88200e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PIL/ImageOps.py
Expand Up @@ -293,7 +293,7 @@ def pad(image, size, method=Image.Resampling.BICUBIC, color=None, centering=(0.5
out = Image.new(image.mode, size, color)
palette = image.palette.copy()
if palette:
out.putpalette(palette.palette)
out.putpalette(palette)
if resized.width != size[0]:
x = int((size[0] - resized.width) * max(0, min(centering[0], 1)))
out.paste(resized, (x, 0))
Expand Down

0 comments on commit d88200e

Please sign in to comment.