Linked Questions

Popular Questions

How to convert WMF/EMF to PNG/JPEG in Python?

Asked by At

I need to convert a .wmf file to a .png format.

I can't use libraries under the *GPL license.

Solutions that use external dependencies (such as inkscape or libreoffice in a subprocess) are also not suitable for my project. Using external libraries in the system(installed by apt or another package manager, not by pip) is also undesirable.

I tried using Pillow, but it gives out an OSError (because the project runs on Linux, and Pillow supports .wmf only on Windows):

from PIL import Image

def main():
    img ='test.wmf')'test.png')

if __name__ == '__main__':

OSError: cannot find loader for this WMF file.

Related Questions