mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add pt_to_emu()
This commit is contained in:
parent
f878552be5
commit
57fa364eeb
@ -24,6 +24,9 @@ class LinkedImageNotFound(ValueError):
|
|||||||
def emu_to_pt(x):
|
def emu_to_pt(x):
|
||||||
return x / 12700
|
return x / 12700
|
||||||
|
|
||||||
|
def pt_to_emu(x):
|
||||||
|
return int(x * 12700)
|
||||||
|
|
||||||
def get_image_properties(parent):
|
def get_image_properties(parent):
|
||||||
width = height = None
|
width = height = None
|
||||||
for extent in XPath('./wp:extent')(parent):
|
for extent in XPath('./wp:extent')(parent):
|
||||||
@ -292,5 +295,3 @@ class Images(object):
|
|||||||
else:
|
else:
|
||||||
for tag in self.pict_to_html(elem, page):
|
for tag in self.pict_to_html(elem, page):
|
||||||
yield tag
|
yield tag
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user