You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered this issue with a particular pptx file, which I was trying to convert using pptx2md which is based on python-pptx.
It appears that if an embedded image file is of type enhanced metafile (file with extension emf in ppt/media), if the PowerPoint file is read with python-pptx, the corresponding Image object has content_type = 'image/x-wmf' and ext = 'wmf'. Within pptx2md, this lead to extracted images being written with the wrong extension, which then cannot be read e.g. by Inkscape. I found that in such cases, filename = 'image.emf', and I contributed a PR ssine/pptx2md#73 which relies on that. That seems hacky though, and a fix in python-pptx would be better.
The text was updated successfully, but these errors were encountered:
I encountered this issue with a particular
pptx
file, which I was trying to convert usingpptx2md
which is based onpython-pptx
.It appears that if an embedded image file is of type enhanced metafile (file with extension
emf
inppt/media
), if the PowerPoint file is read withpython-pptx
, the correspondingImage
object hascontent_type = 'image/x-wmf'
andext = 'wmf'
. Withinpptx2md
, this lead to extracted images being written with the wrong extension, which then cannot be read e.g. by Inkscape. I found that in such cases,filename = 'image.emf'
, and I contributed a PR ssine/pptx2md#73 which relies on that. That seems hacky though, and a fix inpython-pptx
would be better.The text was updated successfully, but these errors were encountered: