dotnet / dotnet/winforms

Enable `png` based `ico` files and streams to be loaded into `Bitmap`

Open
#11,469 1 comment 0 reactions 0 assignees View on GitHub
area-System.Drawing enhancement
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

In PR #11375 we discovered that when converting `bmp` based `ico` resources to be `png` based, there was a failure when loading the icons as the `ToolboxBitmapAttribute` tries to create the resource as a `bitmap`. This errors out as `bitmap` uses different PInvokes from `Icon`, with `Icon` PInvokes supporting `png` for a few windows versions.

This would enable us to convert the `ico` files to be `png` based, saving a few megabytes in an AOT compiled app (#11370).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.