ghostscript.py not saved in last commit

Given importance of last one, confirmed that when the file is saved all tests pass too.
Passing is invariant with this change.
This commit is contained in:
James R. Barlow
2018-05-01 22:59:22 -07:00
parent b5d7e9cbb0
commit d787e1ea0f
+8 -8
View File
@@ -122,14 +122,14 @@ def rasterize_pdf(input_file, output_file, xres, yres, raster_device, log,
log.debug("Rotating output by %i", rotation)
# rotation is a clockwise angle and Image.ROTATE_* is
# counterclockwise so this cancels out the rotation
# if rotation == 90:
# im = im.transpose(Image.ROTATE_90)
# elif rotation == 180:
# im = im.transpose(Image.ROTATE_180)
# elif rotation == 270:
# im = im.transpose(Image.ROTATE_270)
# if rotation % 180 == 90:
# page_dpi = page_dpi[1], page_dpi[0]
if rotation == 90:
im = im.transpose(Image.ROTATE_90)
elif rotation == 180:
im = im.transpose(Image.ROTATE_180)
elif rotation == 270:
im = im.transpose(Image.ROTATE_270)
if rotation % 180 == 90:
page_dpi = page_dpi[1], page_dpi[0]
im.save(fspath(output_file), dpi=page_dpi)