Skip to content

Resize from large source to small thumbnail produces deformed top pixel rows #1006

@patrikwlund

Description

@patrikwlund

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

Description

Downsizing a large image can cause oddly sampled pixels in the top rows of pixels (I only noticed it in the top rows at least).

I tested multiple samplers. All of them displayed similar results.

Steps to Reproduce

using (var image = Image.Load(flowersJpg))
{
    image.Mutate(i => i.Resize(new ResizeOptions
    {
        Size = new Size(300, 300),
        Mode = ResizeMode.Crop
    }));

    image.SaveAsJpeg(outputStream);
}

System Configuration

  • ImageSharp version: 1.0.0-beta0007
  • Other ImageSharp packages and versions:
  • Environment (Operating system, version and so on): Windows 10 (1903)
  • .NET Framework version: 4.7.1
  • Additional information:

Source Image

flowers

Example results

Resized with ImageSharp
flowers_imagesharp

Resized with ImageResizer
flowers_imageresizer

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions