more IImageDecoder implementations.

This commit is contained in:
morkt
2016-10-27 19:32:58 +04:00
parent c771b13d4e
commit 02e1ee11dd
3 changed files with 94 additions and 46 deletions

View File

@@ -76,11 +76,7 @@ namespace GameRes.Formats.Lilim
public override ImageData Read (IBinaryStream stream, ImageMetaData info)
{
using (var reader = new AbmReader (stream, (AbmImageData)info))
{
var pixels = reader.Unpack();
PixelFormat format = 32 == reader.BPP ? PixelFormats.Bgra32 : PixelFormats.Bgr24;
return ImageData.Create (info, format, null, pixels);
}
return reader.Image;
}
public override void Write (Stream file, ImageData image)