Source-type classification #2

Closed
opened 2026-07-28 19:28:36 +00:00 by Kessinen · 0 comments
Owner

Classify a PDF as bitmap or vector using get_images(full=True) and get_drawings(). A page whose embedded image covers >50% of the page area means a scan. Note full=True is required or get_image_bbox raises.

Done: correct verdict on the two known samples — Elämän nälkä (vector, 0 images, 473 drawings) and Ketun joululaulu (raster, 1 full-page image per page). The result is reported to the user for confirmation, never applied silently (ADR 0004).

Classify a PDF as bitmap or vector using `get_images(full=True)` and `get_drawings()`. A page whose embedded image covers >50% of the page area means a scan. Note `full=True` is required or `get_image_bbox` raises. **Done:** correct verdict on the two known samples — *Elämän nälkä* (vector, 0 images, 473 drawings) and *Ketun joululaulu* (raster, 1 full-page image per page). The result is reported to the user for confirmation, never applied silently (ADR 0004).
Kessinen added this to the M1 — Foundation and PDF input milestone 2026-07-28 19:28:36 +00:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Kessinen/noteman-slicer#2