Skip to content

[IMAGING-383/384] Handle grayscale PNG ICC profiles - #567

Open
dajiaohuang wants to merge 1 commit into
apache:masterfrom
dajiaohuang:IMAGING-383-gray-icc-profile-alpha
Open

dajiaohuang wants to merge 1 commit into
apache:masterfrom
dajiaohuang:IMAGING-383-gray-icc-profile-alpha

Conversation

@dajiaohuang

Copy link
Copy Markdown

Addresses the existing Jira reports IMAGING-383 and IMAGING-384.

Changes

  • Preserve Gray ICC profile handling for grayscale+alpha PNGs by constructing an alpha-capable Gray image before the existing Gray-to-sRGB conversion. This avoids passing the profile to the default RGB color model.
  • Translate ICC conversion failures for malformed profiles into ImagingException, preserving the underlying cause.
  • Add synthetic PNG/ICC fixtures for a valid Gray profile with grayscale+alpha pixels and an empty-tag Gray profile; no real images or Jira attachments are used.

Validation

  • Focused PngIccProfileTest: 2 tests passed.
  • Repository default Maven goal (mvn): succeeded; 2,522 tests, 0 failures, 0 errors, 14 skipped. The Windows task checkout had CRLF endings where Checkstyle expects LF, so 715 tracked uniform-CRLF text files were normalized to LF only during the build and restored afterward. No line-ending changes are included in this PR.

AI disclosure

This PR used OpenAI Codex (gpt-6-luna) to assist with the implementation and synthetic tests. Human operator: dajiaohuang. I reviewed the changes and test results before submission.

Also translate ICC conversion failures for malformed profiles into ImagingException (IMAGING-384). Synthetic PNG/ICC tests cover both behaviors.

Generated-by: OpenAI Codex gpt-6-luna
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