Remove the 1px crop adjustment.

This commit is contained in:
voussoir 2025-11-08 11:24:48 -08:00
parent fe1d3b3d9b
commit fe1aec4b59

View file

@ -25,10 +25,8 @@ def deletterbox(filename):
#image.save('%s_%d%s' % (base, x, ext)) #image.save('%s_%d%s' % (base, x, ext))
rotated = image.rotate(90, expand=True) rotated = image.rotate(90, expand=True)
# There is currently a bug in PIL which causes rotated images
# to have a 1 px black border on the top and left
if rotated.size != image.size: if rotated.size != image.size:
rotated = rotated.crop([1, 1, rotated.size[0], rotated.size[1]]) rotated = rotated.crop([0, 0, rotated.size[0], rotated.size[1]])
image = rotated image = rotated
print() print()
@ -54,7 +52,4 @@ def trim_top(image):
image = image.crop(bounds) image = image.crop(bounds)
return image return image
deletterbox(filename) deletterbox(filename)