mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-12 04:49:32 +08:00
(S25Format.Read): use ImageData.Create shortcut.
This commit is contained in:
parent
1f9e4d7b33
commit
fc27ece34d
@ -80,10 +80,7 @@ namespace GameRes.Formats.ShiinaRio
|
|||||||
using (var reader = new Reader (stream, meta))
|
using (var reader = new Reader (stream, meta))
|
||||||
{
|
{
|
||||||
var pixels = reader.Unpack();
|
var pixels = reader.Unpack();
|
||||||
var bitmap = BitmapSource.Create ((int)info.Width, (int)info.Height, 96, 96,
|
return ImageData.Create (info, PixelFormats.Bgra32, null, pixels);
|
||||||
PixelFormats.Bgra32, null, pixels, (int)info.Width*4);
|
|
||||||
bitmap.Freeze();
|
|
||||||
return new ImageData (bitmap, info);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user