mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 13:45:34 +08:00
(AJP): fixed images without alpha-channel.
This commit is contained in:
parent
70eefd38f4
commit
2c20d845eb
@ -78,6 +78,11 @@ namespace GameRes.Formats.AliceSoft
|
||||
var decoder = new JpegBitmapDecoder (jpeg,
|
||||
BitmapCreateOptions.None, BitmapCacheOption.OnLoad);
|
||||
BitmapSource bitmap = decoder.Frames[0];
|
||||
if (0 == meta.AlphaOffset || 0 == meta.AlphaSize)
|
||||
{
|
||||
bitmap.Freeze();
|
||||
return new ImageData (bitmap, info);
|
||||
}
|
||||
if (bitmap.Format.BitsPerPixel != 32)
|
||||
bitmap = new FormatConvertedBitmap (bitmap, PixelFormats.Bgr32, null, 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user