Skip to content

Fix pdfbox 5079 - #530

Closed
valerybokov wants to merge 3 commits into
apache:trunkfrom
valerybokov:fix-PDFBOX-5079
Closed

valerybokov wants to merge 3 commits into
apache:trunkfrom
valerybokov:fix-PDFBOX-5079

Conversation

@valerybokov

@valerybokov valerybokov commented Sep 12, 2026 •

Copy link
Copy Markdown

PDCalRGB.toRGB() only performed real CIE calibration for whitepoint (1 1 1) and otherwise fell back to a hack that returns the raw component values as-is. That hack was only ever validated for whitepoint D65 (0.9505 1.0 1.089), a workaround for producers that embed already-final RGB values (PDFBOX-2553), but it was being applied to every other whitepoint too, including this issue's D50 Wide Gamut RGB test image, whose intended red rendered as orange since its calibration was silently skipped.

Narrow the hack to trigger only for the exact D65 whitepoint it was written for; every other whitepoint, including (1 1 1) as before, now goes through the real calibration path.


Per https://www.apache.org/legal/generative-tooling.html: portions of this PR were produced with assistance from Claude Code (Anthropic), based on a bug was described in Apache PDFBOX Issue Tracker.

I've reviewed the generated code and confirm to the best of my knowledge that the output does not include any third-party copyrighted material and is compatible with the Apache License 2.0.

asf-gitbox-commits pushed a commit that referenced this pull request Sep 12, 2026
asf-gitbox-commits pushed a commit that referenced this pull request Sep 12, 2026
@valerybokov
valerybokov deleted the fix-PDFBOX-5079 branch September 12, 2026 18:19
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.

1 participant