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,9 +38,10 @@ 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")]'):
|
||||||
imgname = container.href_to_name(img.get('src'), name)
|
if 'style' not in img.attrib:
|
||||||
width, height, fmt = identify_data(container.raw_data(imgname))
|
imgname = container.href_to_name(img.get('src'), name)
|
||||||
img.set('style', 'width: %dpx; height: %dpx' % (width, height))
|
width, height, fmt = identify_data(container.raw_data(imgname))
|
||||||
|
img.set('style', 'width: %dpx; height: %dpx' % (width, height))
|
||||||
|
|
||||||
def fix_opf(self, container):
|
def fix_opf(self, container):
|
||||||
spine_names = {n for n, l in container.spine_names}
|
spine_names = {n for n, l in container.spine_names}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user