Search code examples
c#image-processingimagesharp

SixLabors/ImageSharp breaks down some jpegs


My code:

using (Image<Rgba32> image = Image.Load("1.jpg"))
{
      image.Mutate(ctx => ctx.Resize(image.Width / 2, image.Height / 2));
      image.Save("2.jpg");
}

Input image: 1.jpg

Result: 2.jpg

Other images works good, but some of them is not. What wrong with it? And What I shoul do to process this image?


Solution

  • Testing using the latest development build 1.0.0-dev002271 produces the correct output.

    PM> Install-Package SixLabors.ImageSharp -Version 1.0.0-dev002271 -Source https://www.myget.org/F/sixlabors/api/v3/index.json
    

    Koala