(S25Format.Read): use ImageData.Create shortcut.

This commit is contained in:
morkt 2015-06-11 12:39:26 +04:00
parent 1f9e4d7b33
commit fc27ece34d

View File

@ -80,10 +80,7 @@ namespace GameRes.Formats.ShiinaRio
using (var reader = new Reader (stream, meta))
{
var pixels = reader.Unpack();
var bitmap = BitmapSource.Create ((int)info.Width, (int)info.Height, 96, 96,
PixelFormats.Bgra32, null, pixels, (int)info.Width*4);
bitmap.Freeze();
return new ImageData (bitmap, info);
return ImageData.Create (info, PixelFormats.Bgra32, null, pixels);
}
}