(MG2): don't assume png format for alpha channel.

This commit is contained in:
morkt 2018-10-01 17:50:44 +04:00
parent 5bd512c333
commit ee8255e8a6

View File

@ -118,7 +118,7 @@ namespace GameRes.Formats.Valkyria
using (var input = meta.Scheme.CreateStream (file, 0x10+meta.ImageLength, meta.AlphaLength))
{
var decoder = new PngBitmapDecoder (input, BitmapCreateOptions.None, BitmapCacheOption.OnLoad);
var decoder = BitmapDecoder.Create (input, BitmapCreateOptions.None, BitmapCacheOption.OnLoad);
BitmapSource alpha_frame = decoder.Frames[0];
if (alpha_frame.PixelWidth != frame.PixelWidth || alpha_frame.PixelHeight != frame.PixelHeight)
return BitmapSource.Create ((int)meta.Width, (int)meta.Height,