mirror of
https://github.com/AssetRipper/AssetRipper.git
synced 2025-12-11 20:15:29 +01:00
Fix issue with writing BMP images
This commit is contained in:
parent
09221814d6
commit
07d415a794
@ -130,7 +130,15 @@ public sealed class DirectBitmap<TColor, TChannel> : DirectBitmap
|
|||||||
{
|
{
|
||||||
if (UseFastBmp)
|
if (UseFastBmp)
|
||||||
{
|
{
|
||||||
BmpWriter.WriteBmp(Data, Width, Height * Depth, stream);
|
if (typeof(TColor) == typeof(ColorBGRA32))
|
||||||
|
{
|
||||||
|
BmpWriter.WriteBmp(Data, Width, Height * Depth, stream);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RgbConverter.Convert<TColor, TChannel, ColorBGRA32, byte>(Bits, Width, Height * Depth, out byte[] data);
|
||||||
|
BmpWriter.WriteBmp(data, Width, Height * Depth, stream);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user