Remove the 1px crop adjustment.
This commit is contained in:
parent
fe1d3b3d9b
commit
fe1aec4b59
1 changed files with 1 additions and 6 deletions
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue