mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
oops
This commit is contained in:
parent
2467d2b64c
commit
5616a14c28
@ -796,7 +796,7 @@ class HTMLConverter(object):
|
|||||||
return pt.name
|
return pt.name
|
||||||
except IOError: # PIL chokes on interlaced PNG images
|
except IOError: # PIL chokes on interlaced PNG images
|
||||||
print >>sys.stderr, 'Unable to process interlaced PNG', path
|
print >>sys.stderr, 'Unable to process interlaced PNG', path
|
||||||
return
|
return None
|
||||||
|
|
||||||
pheight = int(self.current_page.pageStyle.attrs['textheight'])
|
pheight = int(self.current_page.pageStyle.attrs['textheight'])
|
||||||
pwidth = int(self.current_page.pageStyle.attrs['textwidth'])
|
pwidth = int(self.current_page.pageStyle.attrs['textwidth'])
|
||||||
@ -855,13 +855,15 @@ class HTMLConverter(object):
|
|||||||
path = scale_image(width, height)
|
path = scale_image(width, height)
|
||||||
width, height = int(width), int(height)
|
width, height = int(width), int(height)
|
||||||
|
|
||||||
|
if not path:
|
||||||
|
return
|
||||||
|
|
||||||
if not self.images.has_key(path):
|
if not self.images.has_key(path):
|
||||||
self.images[path] = ImageStream(path)
|
self.images[path] = ImageStream(path)
|
||||||
|
|
||||||
im = Image(self.images[path], x0=0, y0=0, x1=width, y1=height,\
|
im = Image(self.images[path], x0=0, y0=0, x1=width, y1=height,\
|
||||||
xsize=width, ysize=height)
|
xsize=width, ysize=height)
|
||||||
|
|
||||||
|
|
||||||
self.process_alignment(tag_css)
|
self.process_alignment(tag_css)
|
||||||
|
|
||||||
if max(width, height) <= min(pwidth, pheight)/5.:
|
if max(width, height) <= min(pwidth, pheight)/5.:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user