This commit is contained in:
Kovid Goyal 2008-03-06 20:59:55 +00:00
parent 6de21f6c3a
commit ac64f8029c

View File

@ -893,7 +893,7 @@ class HTMLConverter(object):
factor = 720./self.profile.dpi factor = 720./self.profile.dpi
def scale_image(width, height): def scale_image(width, height):
pt = PersistentTemporaryFile(suffix='.'+encoding.lower()) pt = PersistentTemporaryFile(suffix='_html2lrf_scaled_image_.'+encoding.lower())
self.image_memory.append(pt) # Neccessary, trust me ;-) self.image_memory.append(pt) # Neccessary, trust me ;-)
try: try:
im.resize((int(width), int(height)), PILImage.ANTIALIAS).save(pt, encoding) im.resize((int(width), int(height)), PILImage.ANTIALIAS).save(pt, encoding)
@ -931,7 +931,7 @@ class HTMLConverter(object):
return return
if self.autorotation and width > pwidth and width > height: if self.autorotation and width > pwidth and width > height:
pt = PersistentTemporaryFile(suffix='.'+encoding.lower()) pt = PersistentTemporaryFile(suffix='_html2lrf_rotated_image_.'+encoding.lower())
try: try:
im = im.rotate(90) im = im.rotate(90)
im.save(pt, encoding) im.save(pt, encoding)