Skip to content

File conversion from jpg to webp changes colors of the image #2723

Open
@WimAtIHomer

Description

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of ImageSharp
  • I have verified if the problem exist in both DEBUG and RELEASE mode
  • I have searched open and closed issues to ensure it has not already been reported

ImageSharp version

3.1.4

Other ImageSharp packages and versions

none

Environment (Operating system, version and so on)

Windows 11

.NET Framework version

6 and 8

Description

In our application we resize and change images from png and jpg to webp for better performance on the website. This works very good most of the times. But for some jpg images there is a distinct color change.
It might be related to #1567 but I am not sure, doesn't happen when just resizing the jpg image.

Steps to Reproduce

using var image = await Image.LoadAsync(file.OpenReadStream());
using var outStream = new MemoryStream();
await image.SaveAsync(outStream, new WebpEncoder());

Jpg image:
3_VMware Better Together

webp image looks like this (see webp in zip):
VMware Better Together

Images

VMware Better Together.zip

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions