Image.FromStream throws "Parameter is not valid" for WebP images
Open
area-System.Drawing
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 1.1k
- Avg merge
- 1d 13m
- Merged PRs (30d)
- 85
Description
According to https://learn.microsoft.com/en-us/windows/win32/gdiplus/-gdiplus-constant-image-file-format-constants GDI+ has support for WebP Images. Support was apparently added in the .NET framework [here](https://github.com/dotnet/runtime/issues/70422).
However whenever I say the following:
```
using var stream = file.OpenReadStream();
using var image = Image.FromStream(stream);
```
I get the error:
> ArgumentException: Parameter is not valid.
> System.Drawing.SafeNativeMethods+Gdip.CheckStatus(int status)
This works fine for most of the other image formats (jpg, gif, png etc).
Contributor guide
Assessment
This issue has not been assessed yet.