Skip to content

[ImageResizer] Fix the missing settings of png encoder#46695

Merged
moooyo merged 1 commit intomainfrom
yuleng/ir/f/1
Apr 1, 2026
Merged

[ImageResizer] Fix the missing settings of png encoder#46695
moooyo merged 1 commit intomainfrom
yuleng/ir/f/1

Conversation

@moooyo
Copy link
Copy Markdown
Contributor

@moooyo moooyo commented Apr 1, 2026

  • Apply codec-specific encoder properties (e.g. JPEG quality) in the transcode path when transforms are required, matching WPF behavior.
  • Apply PngInterlaceOption to the WinRT PNG encoder via the "InterlaceOption" BitmapPropertySet entry; previously the setting was persisted but never passed to the encoder.

Summary of the Pull Request

PR Checklist

  • Closes: #xxx
  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

…ot applied

- Apply codec-specific encoder properties (e.g. JPEG quality) in the
  transcode path when transforms are required, matching WPF behavior.
- Apply PngInterlaceOption to the WinRT PNG encoder via the
  "InterlaceOption" BitmapPropertySet entry; previously the setting was
  persisted but never passed to the encoder.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@moooyo moooyo marked this pull request as ready for review April 1, 2026 09:23
@moooyo moooyo requested a review from Copilot April 1, 2026 09:24
@moooyo moooyo self-assigned this Apr 1, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes encoder-settings gaps in ImageResizer by ensuring codec-specific encoder options are actually applied during the transcode path (when transforms force re-encoding), and by correctly passing the persisted PNG interlace setting to the WinRT PNG encoder.

Changes:

  • Apply codec-specific encoder properties in the transform/transcode path via encoder.BitmapProperties.SetPropertiesAsync(...).
  • Add PNG "InterlaceOption" to the BitmapPropertySet when _settings.PngInterlaceOption is explicitly set to On/Off.

Comment thread src/modules/imageresizer/ui/Models/ResizeOperation.cs
@moooyo moooyo enabled auto-merge (squash) April 1, 2026 09:49
@moooyo moooyo merged commit 4ce451e into main Apr 1, 2026
19 checks passed
@moooyo moooyo deleted the yuleng/ir/f/1 branch April 1, 2026 11:13
@LegendaryBlair LegendaryBlair added this to the PowerToys 0.99 milestone Apr 15, 2026
@LegendaryBlair LegendaryBlair added the Product-Image Resizer Things regarding image resizing module label Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Product-Image Resizer Things regarding image resizing module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants