Method ImageUtil.ConvertWpfImageElementToGdipBitmap
Overload
Converts WPF image element to GDI+ image.
public static Bitmap ConvertWpfImageElementToGdipBitmap(FrameworkElement e, int dpi, SIZE? size = null)
Parameters
e (FrameworkElement)
For example Viewbox. |
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). |