Skip to content

[BUG] SKBitmap.Resize crashes #2012

@alienghub

Description

@alienghub

Description

SKBitmap.Resize with negative width/height values crashes the app

Code

SKImageInfo info = image.Info;
info.Width = -1;
info.Height = -1;
SKBitmap skb = SKBitmap.FromImage(image);
SKBitmap skb2 = skb.Resize(info, SKFilterQuality.High); //crash

Expected Behavior

Returns the resized bitmap if the resize operation could be performed, otherwise null.

Actual Behavior

Crashes while resizing

Basic Information

  • Version with issue: 2.88.0-preview.256
  • Last known good version:
  • IDE: Visual Studio
  • Platform Target Frameworks: WinUI

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/SkiaSharpIssues that relate to the C# binding of SkiaSharp.type/bug

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions