public static BitmapSource GetBimapSource(this IImageRead imageRead) { const double dpi = 96.0; var size = imageRead.Size; var data = imageRead.ToBgra32(); return(BitmapSource.Create(size.Width, size.Height, dpi, dpi, PixelFormats.Bgra32, null, data, size.Width * 4)); }
public ISpriteTexture CreateSpriteTexture(IImageRead image) => CreateSpriteTexture(image.Size.Width, image.Size.Height, image.ToBgra32());