FreeImage.NET Class Library Reference
FreeImageGetBitmapForDevice Method |
Returns an HBITMAP created by the CreateDIBitmap() function which in turn
has always the same color depth as the reference DC, which may be provided
through hdc. The desktop DC will be used,
if IntPtr.Zero DC is specified.
Call FreeHbitmap(IntPtr) to free the handle.
Namespace: FreeImageAPI
Assembly: FreeImageNET (in FreeImageNET.dll) Version: 3.17.0.4 (3.17.0)
Syntax
C#
public static IntPtr GetBitmapForDevice( FIBITMAP dib, IntPtr hdc, bool unload )
Parameters
- dib
- Type: FreeImageAPIFIBITMAP
Handle to a FreeImage bitmap. - hdc
- Type: SystemIntPtr
Handle to a device context. - unload
- Type: SystemBoolean
When true the structure will be unloaded on success. If the function failed and returned false, the bitmap was not unloaded.
Return Value
Type: IntPtrIf the function succeeds, the return value is a handle to the compatible bitmap. If the function fails, the return value is Zero.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | dib is null. |
See Also