Skip to content

Commit

Permalink
Mac: Fix creating bitmap rep with proper alpha
Browse files Browse the repository at this point in the history
Fixes #1824
  • Loading branch information
cwensley committed Dec 30, 2020
1 parent 09dfb53 commit af641c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Eto.Mac/Drawing/BitmapHandler.cs
Expand Up @@ -349,7 +349,7 @@ protected void EnsureRep()
int bitsPerPixel = numComponents * bitsPerComponent;
int bytesPerPixel = bitsPerPixel / 8;
int bytesPerRow = bytesPerPixel * size.Width;
bmprep = new NSBitmapImageRep(IntPtr.Zero, size.Width, size.Height, bitsPerComponent, numComponents, true, false, rep.ColorSpaceName, bytesPerRow, bitsPerPixel);
bmprep = new NSBitmapImageRep(IntPtr.Zero, size.Width, size.Height, bitsPerComponent, numComponents, rep.HasAlpha, false, rep.ColorSpaceName, bytesPerRow, bitsPerPixel);
var graphicsContext = NSGraphicsContext.FromBitmap(bmprep);
NSGraphicsContext.GlobalSaveGraphicsState();
NSGraphicsContext.CurrentContext = graphicsContext;
Expand Down

0 comments on commit af641c1

Please sign in to comment.