diff --git a/Tests/test_file_wmf.py b/Tests/test_file_wmf.py
index 07c945848..928493a0f 100644
--- a/Tests/test_file_wmf.py
+++ b/Tests/test_file_wmf.py
@@ -8,7 +8,7 @@ import pytest
 
 from PIL import Image, ImageFile, WmfImagePlugin
 
-from .helper import assert_image_similar_tofile, hopper
+from .helper import assert_image_equal_tofile, assert_image_similar_tofile, hopper
 
 
 def test_load_raw() -> None:
@@ -44,6 +44,15 @@ def test_load_zero_inch() -> None:
             pass
 
 
+def test_render() -> None:
+    with open("Tests/images/drawing.emf", "rb") as fp:
+        data = fp.read()
+    b = BytesIO(data[:808] + b"\x00" + data[809:])
+    with Image.open(b) as im:
+        if hasattr(Image.core, "drawwmf"):
+            assert_image_equal_tofile(im, "Tests/images/drawing.emf")
+
+
 def test_register_handler(tmp_path: Path) -> None:
     class TestHandler(ImageFile.StubHandler):
         methodCalled = False
diff --git a/src/display.c b/src/display.c
index a05387504..ac2134a57 100644
--- a/src/display.c
+++ b/src/display.c
@@ -687,6 +687,14 @@ PyImaging_EventLoopWin32(PyObject *self, PyObject *args) {
 
 #define GET32(p, o) ((DWORD *)(p + o))[0]
 
+static int CALLBACK
+enhMetaFileProc(
+    HDC hdc, HANDLETABLE *lpht, const ENHMETARECORD *lpmr, int nHandles, LPARAM data
+) {
+    PlayEnhMetaFileRecord(hdc, lpht, lpmr, nHandles);
+    return 1;
+}
+
 PyObject *
 PyImaging_DrawWmf(PyObject *self, PyObject *args) {
     HBITMAP bitmap;
@@ -767,10 +775,7 @@ PyImaging_DrawWmf(PyObject *self, PyObject *args) {
     /* FIXME: make background transparent? configurable? */
     FillRect(dc, &rect, GetStockObject(WHITE_BRUSH));
 
-    if (!PlayEnhMetaFile(dc, meta, &rect)) {
-        PyErr_SetString(PyExc_OSError, "cannot render metafile");
-        goto error;
-    }
+    EnumEnhMetaFile(dc, meta, enhMetaFileProc, NULL, &rect);
 
     /* step 4: extract bits from bitmap */