Skip to content

fix: Respect DPI in page rendering on ImageBackend - #4012

Merged
PeterStaar-IBM merged 1 commit into
mainfrom
cau/image-backend-dpi-fixes
Aug 17, 2026
Merged

PeterStaar-IBM merged 1 commit into
mainfrom
cau/image-backend-dpi-fixes

Conversation

@cau-git

@cau-git cau-git commented Aug 17, 2026

Copy link
Copy Markdown
Member

Summary

Image pages previously treated source pixels as 72-DPI document coordinates, causing pipeline scale factors to unnecessarily upscale high-DPI scans.

Respect embedded image DPI when defining page geometry, normalize missing or (1, 1) DPI to 72 DPI, and render scaled crops from logical page coordinates.

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ DCO Check Passed

Thanks @cau-git, all your commits are properly signed off. 🎉

@mergify

mergify Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 Merge protection satisfied — ready to merge.

Show 1 satisfied protection

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@cau-git
cau-git marked this pull request as ready for review August 17, 2026 12:11
@cau-git cau-git changed the title Respect image DPI in page rendering fix: Respect DPI in page rendering on ImageBackend Aug 17, 2026
@codecov

codecov Bot commented Aug 17, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.44444% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
docling/backend/image_backend.py 88.37% 5 Missing ⚠️
...ls/stages/table_structure/table_structure_model.py 0.00% 1 Missing ⚠️
...stages/table_structure/table_structure_model_v2.py 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@dolfim-ibm dolfim-ibm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@PeterStaar-IBM PeterStaar-IBM left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@PeterStaar-IBM
PeterStaar-IBM merged commit 9e974af into main Aug 17, 2026
37 of 48 checks passed
@PeterStaar-IBM
PeterStaar-IBM deleted the cau/image-backend-dpi-fixes branch August 17, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants