/// <summary> /// Initializes a new instance of the <see cref="Bitmap"/> class. /// </summary> /// <param name="stream">The stream to read the bitmap from.</param> public Bitmap(Stream stream) { IPlatformRenderInterface factory = AvaloniaLocator.Current.GetService <IPlatformRenderInterface>(); PlatformImpl = factory.LoadBitmap(stream); }
/// <summary> /// Initializes a new instance of the <see cref="Bitmap"/> class. /// </summary> /// <param name="fileName">The filename of the bitmap.</param> public Bitmap(string fileName) { IPlatformRenderInterface factory = AvaloniaLocator.Current.GetService <IPlatformRenderInterface>(); PlatformImpl = factory.LoadBitmap(fileName); }