Skip to content

Fix profile icon resolution for ICO files - #20659

Draft
DeliberateEnsemble (vortsghost2025) wants to merge 1 commit into
microsoft:mainfrom
vortsghost2025:contrib/profile-ico-resolution-19264
Draft

DeliberateEnsemble (vortsghost2025) wants to merge 1 commit into
microsoft:mainfrom
vortsghost2025:contrib/profile-ico-resolution-19264

Conversation

@vortsghost2025

Copy link
Copy Markdown

Description

Route .ico profile icon paths through the existing SHDefExtractIcon/WIC conversion path instead of BitmapIconSource. Windows can then select the icon image matching the requested size rather than using the first image in the .ico file.

Fixes #19264

Validation

  • clang-format --dry-run --Werror --style=file src/cascadia/UIHelpers/IconPathConverter.cpp
  • git diff --check with core.whitespace=cr-at-eol for the repository's CRLF worktree files
  • PowerShell 7.6.5 native SHDefExtractIcon probe against the issue's multi-resolution test.ico: requests for 16, 24, 32, 48, 64, 96, 128, and 256 pixels returned matching image dimensions

A full Visual Studio/MSBuild/TAEF build was not available in this environment.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@lhecker

Copy link
Copy Markdown
Member

NOTE: We do not accept PRs that haven't been tested locally. Please build and run the project. A screenshot of the loaded .ico files would suffice.

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.

Terminal will always choose 16x16 image in profile icon regardless resolution and scaling when an .ico file is used.

2 participants