Method ImageUtil.LoadGdipBitmapFromXaml
Overload
Loads GDI+ image from WPF XAML file or string.
public static Bitmap LoadGdipBitmapFromXaml(string image, int dpi, SIZE? size = null)
Parameters
image (string)
XAML file, resource or string. See ImageUtil.LoadWpfImageElement. |
dpi (int)
DPI of window that will display the image. |
size (SIZE?)
Final image size in logical pixels (not DPI-scaled). If |
Returns
Bitmap
New Bitmap. Note: its pixel format is Format32bppPArgb (premultiplied ARGB). |
Exceptions
Remarks
Calls ImageUtil.LoadWpfImageElement and ImageUtil.ConvertWpfImageElementToGdipBitmap. Don't use the Tag property of the bitmap. It keeps bitmap data.