Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Win11 24H2 .NET bug rendering text to image using GDI+ #12910

Open
tracktownsoftware opened this issue Feb 10, 2025 · 5 comments
Open

Win11 24H2 .NET bug rendering text to image using GDI+ #12910

tracktownsoftware opened this issue Feb 10, 2025 · 5 comments
Assignees
Labels
area-System.Drawing System.Drawing issues

Comments

@tracktownsoftware
Copy link

Description

Previous to 24H2, running the same code to generate an image with text produced an identical image every time that passed a pixel-by-pixel comparison test. As of 24H2 the same images generated twice fail pixel-by-pixel comparison.

This is a .NET issue. The tests pass when I use .NET Framework 4.8.

Note: I reported this bug to Windows 11 feedback before realizing this is a .NET issue (https://aka.ms/AAuckmw).

Reproduction Steps

Repo with code to reproduce the bug: https://github.com/tracktownsoftware/Win11-24H2-ImageTextBug
Press the "Compare Images" button.

Expected behavior

Expected behavior:

  • The code generates identical images every time.
  • Pixel-by-pixel comparison passes (before Windows 11 version 24H2)

Actual behavior

Actual behavior:
The same images are generated twice but fail pixel-by-pixel comparison. This started with the release of Windows 11 version 24H2.

Note: On a computer with 24H2 I changed the test app to use .NET Framework 4.8. The comparison tests passed, showing this to be a .NET issue.

Regression?

Yes this is a regression. If you run the repo test app with a Win11 version before 24H2 then it works.

Known Workarounds

Don't upgrade to Windows 11 to 24H2

Configuration

No response

Other information

No response

@dotnet-policy-service dotnet-policy-service bot added the untriaged The team needs to look at this issue in the next triage label Feb 10, 2025
@vcsjones vcsjones added the area-System.Drawing System.Drawing issues label Feb 10, 2025
@ViktorHofer
Copy link
Member

@JeremyKuhne

@JeremyKuhne JeremyKuhne transferred this issue from dotnet/runtime Feb 10, 2025
@JeremyKuhne
Copy link
Member

@tracktownsoftware Fwiw, we use the same GDI+ APIs on .NET Framework as we do in .NET.

@Olina-Zhang can you see if you can reproduce the behavior and validate that it only happens on .NET and not .NET Framework?

@JeremyKuhne JeremyKuhne removed the untriaged The team needs to look at this issue in the next triage label Feb 10, 2025
@JeremyKuhne JeremyKuhne self-assigned this Feb 10, 2025
@tracktownsoftware
Copy link
Author

@JeremyKuhne @Olina-Zhang
Thank you for looking at this. Let me know if there is anything else I can do, like adding a DN48 version of the test project to the Win11-24H2-ImageTextBug repo.

@Olina-Zhang
Copy link
Member

@Olina-Zhang can you see if you can reproduce the behavior and validate that it only happens on .NET and not .NET Framework?

We can use physical machine see the .NET and .NET framework have different results on Win11 24H2, not VMs

Image

@tracktownsoftware
Copy link
Author

tracktownsoftware commented Feb 11, 2025

Setting up a Hyper-V VM with the older 23H2 shows the NET8 test working.

Image

After updating the 23H2 Hyper-V VM to 24H2, this test now fails.

Image

edited to crop images

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Drawing System.Drawing issues
Projects
None yet
Development

No branches or pull requests

5 participants