Skip to content

Resized image contains a a different layer on lower part #926

@vikash-agrawal-arimon

Description

@vikash-agrawal-arimon

Hi,

I am using beta 6 release Image Sharp and deploying on Azure App Functions. Image resizing is working but the lower part of the resized image contains a different layer it seems.
Below is my code to resize:

using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Formats.Jpeg;
using SixLabors.ImageSharp.Formats.Png;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.Primitives;

public static void Run(Stream myBlob, string name, ILogger log, Stream outputBlob)
{
    log.LogInformation($"C# Blob trigger function Processed blob\n Name:{name} \n Size: {myBlob.Length} Bytes");
    using (Image<Rgba32> image  = Image.Load(myBlob))
    {
                image.Mutate(x => x.Resize(300, 200));
                image.Save(outputBlob,new PngEncoder());
 
    }
}

Original Image:
DSC_0120 (1)

Resized:
DSC_0120

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions