Skip to content

Resizing animated GIFs causes quality loss after 3.0.0 #2450

@sschim

Description

@sschim

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.0.1

Other ImageSharp packages and versions

None

Environment (Operating system, version and so on)

Windows 11

.NET Framework version

7

Description

Using ImageSharp to resize animated GIFs produces different results on 2.1.4 versus 3.0.0 and 3.0.1.
The output size is much smaller on 3.x, but the quality is a lot worse.

Steps to Reproduce

This is the sample code I've used to generate the samples:

var image = Image.Load("input.gif");

image.Mutate(x =>
{
    x.Resize(250, 0);
});

image.Save("resized.gif");

Images

Original:
input

Resized using 2.1.4:
resized-2 1 4

Resized using 3.0.1:
resized-3 0 1

Metadata

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