Skip to content

Fail to Load a Gif Image with v2.0.0 but works with v1.0.4 on the same machine. #2012

@paulyipkh

Description

@paulyipkh

ImageSharp version

2.0.0

Other ImageSharp packages and versions

1.0.4

Environment (Operating system, version and so on)

Windows 10

.NET Framework version

.NET 5

Description

I came across a gif image https://www.muhammadniaz.net/wp-content/uploads/2013/06/Stronghold-Crusader-Extreme-Cover.gif which loaded correctly with ImageSharp v1.0.4 but failed with v2.0.0 with an unmanaged exception which cannot be caught by the try-catch

Steps to Reproduce

try
{
    var client = new HttpClient();
    string url = "https://www.muhammadniaz.net/wp-content/uploads/2013/06/Stronghold-Crusader-Extreme-Cover.gif";
    var bytes = await client.GetByteArrayAsync(url);
    var image = SixLabors.ImageSharp.Image.Load(bytes, out var format);
    Console.WriteLine(format);
}
catch (Exception e)
{
    Console.WriteLine(e.Message);
    Console.WriteLine(e.StackTrace);
    Debugger.Break();
}

Images

Stronghold-Crusader-Extreme-Cover

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions