SixLabors / ImageSharp

:camera: A modern, cross-platform, 2D Graphics library for .NET

Home Page:https://sixlabors.com/products/imagesharp/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Black Background after resizing in the latest version.

Elinareso opened this issue · comments

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

Other ImageSharp packages and versions

3.0.2

Environment (Operating system, version and so on)

Windows VS 17.8.7

.NET Framework version

NET7, NET8

Description

After Resize and image to create a Thumbnail the result image is being created with a black or green or gray background.

            using SixLabors.ImageSharp.Image image = SixLabors.ImageSharp.Image.Load(Bytes);

            var imageResized = new MemoryStream();

            image.Mutate(x => x.Resize(dimensions.Width, dimensions.Height));
            image.Save(imageResized, image.Metadata.DecodedImageFormat);

Steps to Reproduce

Using the version 3.0.2 the thumbnail es created at the same of the original png image. After upgrading to 3.1.2 a background is in the result image.

Images

Original
Result

Looks like we're not capturing the correct entry for the alpha palette (or maybe setting it incorrectly).

Looks like we're not capturing the correct entry for the alpha palette (or maybe setting it incorrectly).

Thanks so much for your quick fix. We are waiting the new version to move on this.

Thanks so much for your quick fix. We are waiting the new version to move on this.

No problem. There's be a release out this week. Make sure that your company is working in accordance with the Six Labors License

Thanks so much for your quick fix. We are waiting the new version to move on this.

No problem. There's be a release out this week. Make sure that your company is working in accordance with the Six Labors License

Yes, we are! 👍