Browse Source

Correctly compare source and destination pixel format (#12940)

pull/12958/head
Benedikt Stebner 3 years ago
committed by GitHub
parent
commit
407440645b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Avalonia.Base/Media/Imaging/Bitmap.cs

2
src/Avalonia.Base/Media/Imaging/Bitmap.cs

@ -241,7 +241,7 @@ namespace Avalonia.Media.Imaging
throw new NotSupportedException("CopyPixels is not supported for this bitmap type");
}
if (readable.Format != Format || readable.AlphaFormat != alphaFormat)
if (buffer.Format != readable.Format || alphaFormat != readable.AlphaFormat)
{
using (var fb = readable.Lock())
{

Loading…
Cancel
Save