Skip to content

Converting a PNG to AVIFF with Alpha(AlphaOption.Deactivate) and Scale causes application crash #1950

@philipmvp

Description

@philipmvp

Magick.NET version

Magick.NET-Q8-x64 14.10.1

Environment (Operating system, version and so on)

Windows 11

Description

Converting a PNG to AVIFF with Alpha 'Deactivate' option along with Scale() method invocation causes the application to crash.

Steps to Reproduce

public static void Main()
{
    try
    {
        using (var image = new MagickImage())
        {
            var file = @"D:\ImageMagickTest\AVIF\1.png";
            var defaultSettings = new MagickReadSettings
            {
                Format = MagickFormat.Png
            };

            image.Read(file, defaultSettings);
            if (image.HasAlpha)
                image.Alpha(AlphaOption.Deactivate);
            image.Scale(new MagickGeometry(300, 132));
            image.Write(@"D:\ImageMagickTest\AVIF\output.avif");
        }
    }
    catch (Exception ex)
    {
        Console.WriteLine(ex);
    }
}

Images

I tested with PNG from here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions