-
Notifications
You must be signed in to change notification settings - Fork 986
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
ImageCodecInfo.GetImageEncoders()
throws fatal exception in 9.0.0 package.
#12494
Comments
@bitbound you can work around this by getting one of the Validation that GDI+ is initialized slipped through in this use case. Need to check other places PInvokes come from the Core assembly. Will fix and put up for servicing. |
@JeremyKuhne Thanks for the reply. If it helps, here's my use case. This is in a desktop console app (Windows only). Is there another way to adjust encoding quality that'd work around this issue? Or would you recommend migrating to SkiaSharp?
|
@bitbound presumably you're ok. Since I wasn't super clear here, you can just access a static resource to work around this until we get a servicing fix. So |
Need to service .NET 9. |
Actually, the only method I missed in .NET 9 was GetImageEncoders. |
@JeremyKuhne Verified the issue on latest .NET SDK 10.0.100-alpha.1.24570.21, there's no exception in ImageCodecInfo.GetImageEncoders() now. But the Non-Public members node does not show in each GetImageEncoders returned item in .NET 10.0, is that the expected result? |
@John-Qiao the debugger issue doesn't have anything to do with my change. Not sure what that would be coming from. This was serviced back to .NET 9, the first update is in January. |
.NET version
9.0
Did it work in .NET Framework?
Yes
Did it work in any of the earlier releases of .NET Core or .NET 5+?
Yes. It worked in 8.0.x.
Issue description
ImageCodecInfo.GetImageEncoders()
throws a fatal exception in the 9.0.0 version ofSystem.Drawing.Common
.Steps to reproduce
Exception in 9.0
Working in 8.0
The text was updated successfully, but these errors were encountered: