SixLabors / ImageSharp

:camera: A modern, cross-platform, 2D Graphics library for .NET
https://sixlabors.com/products/imagesharp/
Other
7.31k stars 846 forks source link

Black Background after resizing in the latest version. #2668

Closed Elinareso closed 5 months ago

Elinareso commented 6 months ago

Prerequisites

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

JimBobSquarePants commented 6 months ago

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

Elinares-82 commented 6 months ago

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.

JimBobSquarePants commented 5 months ago

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

Elinares-82 commented 5 months ago

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! 👍