Skip to main content

pillow-wmf

Open Windows Metafiles (WMF) and Enhanced Metafiles (EMF) with Pillow.

pip install pillow-wmf
from PIL import Image
import pillow_wmf  # registers the WMF and EMF loader

with Image.open("drawing.wmf") as image:
    image.load(size=(640, 480))
    image.save("drawing.png")

Omit the load() call to use the default size. An EMF is fitted to the requested size through its picture frame, as PlayEnhMetaFile does, and by default is drawn at the frame's size in its reference-device pixels. EMF+ (GDI+) drawing is not rendered; files with a GDI fallback draw that instead. A WMF that carries an intact embedded EMF, as GetWinMetaFileBits writes it, renders that EMF instead of its records, as SetWinMetaFileBits would. Records that cannot yet be drawn exactly raise rather than produce partial art.

License

Code · Wingdings fallback · Wine Symbol

Metadata

Release files for pillow-wmf 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pillow-wmf 0.3.1
File Size Uploaded Provenance Actions
pillow_wmf-0.3.1.tar.gz 349.4 kB Without provenance Details for pillow_wmf-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pillow-wmf 0.3.1
File Interpreter ABI Platform Actions
pillow_wmf-0.3.1-py3-none-any.whl Python 3 none any Details for pillow_wmf-0.3.1-py3-none-any.whl

Total release size: 745.0 kB

Release files / pillow_wmf-0.3.1.tar.gz

Download URL pillow_wmf-0.3.1.tar.gz
Size 349.4 kB
Tags Source
SHA-256 checksum
How to use checksums
efd5c4b697bb29130674936acd5e11252e5d025618dc095d933633d39dafa832
BLAKE2b-256 checksum
How to use checksums
953ea80330ac546d72fc4c15273b04ab9ce053dad3d6a7dcc84db6f4f04e2a7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Release files / pillow_wmf-0.3.1-py3-none-any.whl

Download URL pillow_wmf-0.3.1-py3-none-any.whl
Size 395.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0932c934048545f5b1ccb4d7978d9154f201a860976746477048ad070de0c582
BLAKE2b-256 checksum
How to use checksums
ed32cfde2b25e3cf02330fb21d46517bb29b7a9895a5c7a746cf5aa6aba1f6bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Security for pillow-wmf 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page