use of webp extension as backgroundimage
This issue has been moved from a ticket on Developer Community.
Suggestion! There is already a webp part https://learn.microsoft.com/en-us/dotnet/api/system.drawing.imaging.imageformat.webp?view=net-8.0 however. We can't use that kind of image as background. Please add it.
Original Comments
Feedback Bot on 7/10/2024, 00:58 AM:
(private comment, text removed)
It's not clear to me what "Background" means in this context. Do you mean in a WinForms or WPF app?
I think this should be moved to dotnet/winforms; SDC is now owned by the Windows Forms team (#83356).
cc @JeremyKuhne
Duplicate of #9014, #9107, #10559
@JeremyKuhne @elachlan It looks like we should have one tracking issue for missing support for WebP then? Are these issues all the same?
This is what was previously communicated:
Unfortunately, there isn't anything we can do here as we're interacting directly with GDI+, which doesn't support this. Please see our recommendations for other libraries to consider for more modern graphics support.
https://github.com/dotnet/runtime/issues/76237#issuecomment-1469009299
Webp is supported in theory, I'm looking into the details.
Not sure what exactly the constraints are, I need to debug. Ultimately, we're relying on GDI+, which does have a wrapper for the WIC codec for this. I didn't get a smoke test to load, I need to find some time to debug. Whatever the result of that is, we're dependent on Windows here and this is not an area they are investing in.
Not sure if this is relevant to the issue, but apparently Gdiplus does not load external codecs like webp without specifying StartupParameters = 4 in GdiplusStartupInputEx (currently initialized with 0). I'm testing in Windows 11 25H2 (build 26200.6899).
Documentation for StartupParameters https://learn.microsoft.com/en-us/windows/win32/api/gdiplusinit/ne-gdiplusinit-gdiplusstartupparams
The value in question is in preview.
GdiplusStartupReserved0
Value: 0x00000004
Still in preview.
@JeremyKuhne documentation hasn't been updated since Feb-2024. Is there someone we can ask to see if its now "stable" in windows 11?