mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
use ImageData.Create method instead of BitmapSource.Create.
This commit is contained in:
@@ -146,11 +146,7 @@ namespace GameRes.Formats.Ainos
|
||||
reader.UnpackRGB();
|
||||
else
|
||||
reader.UnpackIndexed();
|
||||
byte[] pixels = reader.Data;
|
||||
var bitmap = BitmapSource.Create ((int)info.Width, (int)info.Height, 96, 96,
|
||||
PixelFormats.Bgr24, null, pixels, (int)info.Width*3);
|
||||
bitmap.Freeze();
|
||||
return new ImageData (bitmap, info);
|
||||
return ImageData.Create (info, PixelFormats.Bgr24, null, reader.Data, (int)info.Width*3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user