feat: add pngmonod raster device to enum (#1688)

This commit is contained in:
James R. Barlow
2026-06-05 11:40:49 -07:00
parent 87f918f58c
commit 09f2d6c386
2 changed files with 9 additions and 0 deletions
+1
View File
@@ -38,6 +38,7 @@ class GhostscriptRasterDevice(StrEnum):
JPEGGRAY = 'jpeggray'
JPEGCOLOR = 'jpeg'
PNGMONO = 'pngmono'
PNGMONOD = 'pngmonod'
PNGGRAY = 'pnggray'
PNG256 = 'png256'
PNG16M = 'png16m'
+8
View File
@@ -298,6 +298,14 @@ def test_ink_enum_is_picklable():
assert pickle.loads(pickle.dumps(member)) is member
def test_pngmonod_device_exists():
from ocrmypdf.pluginspec import GhostscriptRasterDevice
assert GhostscriptRasterDevice.PNGMONOD == 'pngmonod'
# PNGMONO retained for compatibility / explicit use
assert GhostscriptRasterDevice.PNGMONO == 'pngmono'
def _ink_of_first_xobject(body: bytes):
from ocrmypdf.pdfinfo._contentstream import _interpret_contents