diff --git a/imxml2epub.py b/imxml2epub.py index 830d8ed..645e035 100755 --- a/imxml2epub.py +++ b/imxml2epub.py @@ -1263,7 +1263,9 @@ class FootnoteError(Exception): strImageFilepath = libeoaconvert.sanitizeImage(os.getcwd() + "/CONVERT/epub/OEBPS/images/" + strImageFileDir + strImageFileName, GM_PATH, TL_PATH) # Add copied file to contentopf - contentopf = addToContentopf(contentopf, "images/" + strImageFileDir + strImageFileName, strImageFileDir + strImageFileName, "jpg") + img_base_file_name, img_file_extension = os.path.splitext(strImageFileName) + + contentopf = addToContentopf(contentopf, "images/" + strImageFileDir + strImageFileName, strImageFileDir + strImageFileName, img_file_extension[1:]) # strSVGTemplate = """""" # xmlSVGFacsimile = etree.fromstring(strSVGTemplate)