Skip to content

Commit

Permalink
Fix colortype on decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
cinderblocks committed Aug 5, 2024
1 parent c7430c5 commit d1d155c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CSJ2K.Skia/Util/SKBitmapImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ protected override object GetImageObject()
var bitmap = new SKBitmap();

var gcHandle = GCHandle.Alloc(Bytes, GCHandleType.Pinned);
var info = new SKImageInfo(Width, Height, SKImageInfo.PlatformColorType, SKAlphaType.Unpremul);
var info = new SKImageInfo(Width, Height, SKColorType.Bgra8888, SKAlphaType.Unpremul);
bitmap.InstallPixels(info, gcHandle.AddrOfPinnedObject(), info.RowBytes,
delegate { gcHandle.Free(); }, null);

Expand Down

0 comments on commit d1d155c

Please sign in to comment.