(EriFormat.Read): use ImageData.Create shortcut method.

This commit is contained in:
morkt 2015-07-27 01:33:03 +04:00
parent 4cd5b81f21
commit eee1bdae38

View File

@ -204,11 +204,7 @@ namespace GameRes.Formats.Entis
}
var reader = new EriReader (stream, meta, palette);
reader.DecodeImage();
var bitmap = BitmapSource.Create ((int)info.Width, (int)info.Height,
ImageData.DefaultDpiX, ImageData.DefaultDpiY,
reader.Format, reader.Palette, reader.Data, reader.Stride);
bitmap.Freeze();
return new ImageData (bitmap, info);
return ImageData.Create (info, reader.Format, reader.Palette, reader.Data, reader.Stride);
}
}