Skip to content

Commit 007ee62

Browse files
committed
don't overwrite eps image size
1 parent a06bcae commit 007ee62

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Tests/images/eps/1.bmp

-496 Bytes
Binary file not shown.

src/PIL/EpsImagePlugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,8 @@ def _read_comment(s: str) -> bool:
334334
else:
335335
break
336336

337-
self._size = columns, rows
337+
if not self._size:
338+
self._size = columns, rows
338339
return
339340
elif bytes_mv[:5] == b"%%EOF":
340341
break

0 commit comments

Comments
 (0)