You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since updating to version 11.0.8 I get an ArgumentException with the message "Unable to load bitmap from provided data" when creating WindowIcon from a Bitmap.
To Reproduce
Simple use the WindowIcon ctor with the Bitmap parameter.
Expected behavior
No exception is thrown.
Environment
OS: Windows 10 22H2 OS Build 19045.3803
Avalonia-Version: 11.0.8
Additional context
I was able to debug the problem and for me it seems that the problem is that in Win32Platofrm.LoadIcon(IBitmapImpl) does not reset the create MemoryStreams position. Therefore any further call uses an empty array which in the end leads to the ArgumentException.
When I use the Stream parameter ctor of WindowIcon with a stream created by myself (and the position reset) everything works fine.
The text was updated successfully, but these errors were encountered:
Describe the bug
Since updating to version 11.0.8 I get an ArgumentException with the message "Unable to load bitmap from provided data" when creating WindowIcon from a Bitmap.
To Reproduce
Simple use the WindowIcon ctor with the Bitmap parameter.
Expected behavior
No exception is thrown.
Environment
Additional context
I was able to debug the problem and for me it seems that the problem is that in Win32Platofrm.LoadIcon(IBitmapImpl) does not reset the create MemoryStreams position. Therefore any further call uses an empty array which in the end leads to the ArgumentException.
When I use the Stream parameter ctor of WindowIcon with a stream created by myself (and the position reset) everything works fine.
The text was updated successfully, but these errors were encountered: