dotnet / dotnet/winforms

ImageFormat.Webp always reverts to the png codec.

Open
#10,559 3 comments 0 reactions 0 assignees View on GitHub
area-System.Drawing
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

### .NET version

8.0, or any other version.

### Did it work in .NET Framework?

No

### Did it work in any of the earlier releases of .NET Core or .NET 5+?

_No response_

### Issue description

.NET 8.0 added ImageFormat.Webp but there is no such codec in GDI+. It always reverts to using the png codec.

### Steps to reproduce

bitmap1.Save("test.webp", ImageForma.Webp);
//or
ImageCodecInfo.GetImageEncoders(); // no webp encoder exists.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.