Click or drag to resize

ImageUtilitiesGetBitmap Method

Gets a bitmap from a bitmap handle. Unlike the standard Image.FromHbitmap method, this method supports transparency.

Namespace:  ShellBoost.Core.Utilities
Assembly:  ShellBoost.Core (in ShellBoost.Core.dll) Version: 1.8.3.0
Syntax
C#
public static Bitmap GetBitmap(
	IntPtr bitmapHandle,
	bool fallback = true
)

Parameters

bitmapHandle
Type: SystemIntPtr
A bitmap handle.
fallback (Optional)
Type: SystemBoolean
if set to true, fallback on Image.FromHbitmap if the bitmap doesn't support this method.

Return Value

Type: Bitmap
A bitmap instance.
Exceptions
ExceptionCondition
ArgumentExceptionbitmapHandle is zero or the number of bits required to indicate the color of a pixel of input bitmap is not 32 or input bitmap stride width is not supported.
See Also