mirror of
https://github.com/DarthAffe/HPPH.git
synced 2025-12-12 13:28:37 +00:00
Fixed wrong image format when loading 32bit bitmaps
This commit is contained in:
parent
0a731b5ca4
commit
8fd2ee7091
@ -75,7 +75,7 @@ public static class ImageExtension
|
||||
if (data.PixelFormat.HasFlag(PixelFormat.Format24bppRgb))
|
||||
image = Image<ColorRGB>.Create(buffer, data.Width, data.Height, data.Stride);
|
||||
else if (data.PixelFormat.HasFlag(PixelFormat.Format32bppArgb))
|
||||
image = Image<ColorARGB>.Create(buffer, data.Width, data.Height, data.Stride);
|
||||
image = Image<ColorRGBA>.Create(buffer, data.Width, data.Height, data.Stride);
|
||||
else throw new NotSupportedException($"Unsupported pixel format '{bitmap.PixelFormat}'.");
|
||||
|
||||
bitmap.UnlockBits(data);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user