mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-07 09:01:38 -04:00
...
This commit is contained in:
parent
3f8460c2d4
commit
c1f58cf249
@ -38,6 +38,7 @@ class EPUBHelpBuilder(EpubBuilder):
|
|||||||
root = container.parsed(name)
|
root = container.parsed(name)
|
||||||
# ADE blows up floating images if their sizes are not specified
|
# ADE blows up floating images if their sizes are not specified
|
||||||
for img in root.xpath('//*[local-name() = "img" and (@class = "float-right-img" or @class = "float-left-img")]'):
|
for img in root.xpath('//*[local-name() = "img" and (@class = "float-right-img" or @class = "float-left-img")]'):
|
||||||
|
if 'style' not in img.attrib:
|
||||||
imgname = container.href_to_name(img.get('src'), name)
|
imgname = container.href_to_name(img.get('src'), name)
|
||||||
width, height, fmt = identify_data(container.raw_data(imgname))
|
width, height, fmt = identify_data(container.raw_data(imgname))
|
||||||
img.set('style', 'width: %dpx; height: %dpx' % (width, height))
|
img.set('style', 'width: %dpx; height: %dpx' % (width, height))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user