Skip to content

Commit

Permalink
Fix Color Issue on MacOS and Android by Specifying SKColorType and SK…
Browse files Browse the repository at this point in the history
…AlphaType
  • Loading branch information
Tadelsucht authored and sungaila committed Aug 24, 2023
1 parent 91c2fd1 commit 7d8538e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PDFtoImage/PdfiumViewer/PdfDocument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public SKBitmap Render(int page, int width, int height, float dpiX, float dpiY,
height = height * (int)dpiY / 72;
}

var bitmap = new SKBitmap(width, height);
var bitmap = new SKBitmap(width, height, SKColorType.Bgra8888, SKAlphaType.Premul);
var handle = NativeMethods.FPDFBitmap_CreateEx(width, height, 4, bitmap.GetPixels(), width * 4);

try
Expand Down

0 comments on commit 7d8538e

Please sign in to comment.