mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-12 22:36:58 +08:00
(MG2): don't assume png format for alpha channel.
This commit is contained in:
parent
5bd512c333
commit
ee8255e8a6
@ -118,7 +118,7 @@ namespace GameRes.Formats.Valkyria
|
|||||||
|
|
||||||
using (var input = meta.Scheme.CreateStream (file, 0x10+meta.ImageLength, meta.AlphaLength))
|
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];
|
BitmapSource alpha_frame = decoder.Frames[0];
|
||||||
if (alpha_frame.PixelWidth != frame.PixelWidth || alpha_frame.PixelHeight != frame.PixelHeight)
|
if (alpha_frame.PixelWidth != frame.PixelWidth || alpha_frame.PixelHeight != frame.PixelHeight)
|
||||||
return BitmapSource.Create ((int)meta.Width, (int)meta.Height,
|
return BitmapSource.Create ((int)meta.Width, (int)meta.Height,
|
||||||
|
Loading…
Reference in New Issue
Block a user