mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix #67
This commit is contained in:
parent
a4acd60399
commit
dba36da690
@ -797,8 +797,8 @@ class HTMLConverter(object):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def scale_image(width, height):
|
def scale_image(width, height):
|
||||||
pt = PersistentTemporaryFile(suffix='.png')
|
pt = PersistentTemporaryFile(suffix='.jpeg')
|
||||||
im.resize((int(width), int(height)), PILImage.ANTIALIAS).save(pt, 'PNG')
|
im.resize((int(width), int(height)), PILImage.ANTIALIAS).save(pt, 'JPEG')
|
||||||
pt.close()
|
pt.close()
|
||||||
self.scaled_images[path] = pt
|
self.scaled_images[path] = pt
|
||||||
return pt.name
|
return pt.name
|
||||||
@ -1120,8 +1120,7 @@ def parse_options(argv=None, cli=True):
|
|||||||
if cli:
|
if cli:
|
||||||
parser.print_help()
|
parser.print_help()
|
||||||
raise ConversionError, 'no filename specified'
|
raise ConversionError, 'no filename specified'
|
||||||
if options.title == None:
|
|
||||||
options.title = filename_to_utf8(os.path.splitext(os.path.basename(args[0]))[0])
|
|
||||||
return options, args, parser
|
return options, args, parser
|
||||||
|
|
||||||
|
|
||||||
|
@ -258,6 +258,9 @@ class LrsContainer(object):
|
|||||||
for child in self.contents:
|
for child in self.contents:
|
||||||
if child.has_text():
|
if child.has_text():
|
||||||
return True
|
return True
|
||||||
|
for item in self.contents:
|
||||||
|
if isinstance(item, Plot):
|
||||||
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def append_to(self, parent):
|
def append_to(self, parent):
|
||||||
@ -268,6 +271,7 @@ class LrsContainer(object):
|
|||||||
if self.has_text():
|
if self.has_text():
|
||||||
parent.append(self)
|
parent.append(self)
|
||||||
|
|
||||||
|
|
||||||
def appendReferencedObjects(self, parent):
|
def appendReferencedObjects(self, parent):
|
||||||
for c in self.contents:
|
for c in self.contents:
|
||||||
c.appendReferencedObjects(parent)
|
c.appendReferencedObjects(parent)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user