Add JPEG and PNG image support #2

Merged
forgejo_admin merged 1 commit from image-support into master 2026-06-26 18:22:49 +00:00

Summary

  • Accept .jpg, .jpeg, and .png files in addition to .pdf
  • Images are loaded directly via Pillow — no poppler required
  • Unsupported extensions fail fast with a clear error message
  • Output header uses "Image N" for images, "Page N" for PDFs
  • --dpi and --poppler args apply to PDFs only (no behaviour change)

Test plan

  • Run on a JPEG scan and verify output is correct
  • Run on a PNG and verify output is correct
  • Run on a PDF and verify nothing regressed
  • Pass an unsupported extension and verify the error message
## Summary - Accept `.jpg`, `.jpeg`, and `.png` files in addition to `.pdf` - Images are loaded directly via Pillow — no poppler required - Unsupported extensions fail fast with a clear error message - Output header uses "Image N" for images, "Page N" for PDFs - `--dpi` and `--poppler` args apply to PDFs only (no behaviour change) ## Test plan - [ ] Run on a JPEG scan and verify output is correct - [ ] Run on a PNG and verify output is correct - [ ] Run on a PDF and verify nothing regressed - [ ] Pass an unsupported extension and verify the error message
forgejo_admin added 1 commit 2026-06-26 18:09:53 +00:00
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
forgejo_admin merged commit 05fa727036 into master 2026-06-26 18:22:49 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: forgejo_admin/arabic-ocr#2
No description provided.