Retrieves all parameters needed to create a new FreeImage bitmap from the format of a .NET Image.

Namespace:  FreeImageAPI
Assembly:  FreeImageNET (in FreeImageNET.dll)

Syntax

C#
public static bool GetFormatParameters(
	PixelFormat format,
	out FREE_IMAGE_TYPE type,
	out uint bpp,
	out uint red_mask,
	out uint green_mask,
	out uint blue_mask
)
Visual Basic (Declaration)
Public Shared Function GetFormatParameters ( _
	format As PixelFormat, _
	<OutAttribute> ByRef type As FREE_IMAGE_TYPE, _
	<OutAttribute> ByRef bpp As UInteger, _
	<OutAttribute> ByRef red_mask As UInteger, _
	<OutAttribute> ByRef green_mask As UInteger, _
	<OutAttribute> ByRef blue_mask As UInteger _
) As Boolean
Visual C++
public:
static bool GetFormatParameters(
	PixelFormat format, 
	[OutAttribute] FREE_IMAGE_TYPE% type, 
	[OutAttribute] unsigned int% bpp, 
	[OutAttribute] unsigned int% red_mask, 
	[OutAttribute] unsigned int% green_mask, 
	[OutAttribute] unsigned int% blue_mask
)

Parameters

format
Type: System.Drawing.Imaging..::.PixelFormat
The PixelFormat of the .NET Image.
type
Type: FreeImageAPI..::.FREE_IMAGE_TYPE %
Returns the type used for the new bitmap.
bpp
Type: System..::.UInt32 %
Returns the color depth for the new bitmap.
red_mask
Type: System..::.UInt32 %
Returns the red_mask for the new bitmap.
green_mask
Type: System..::.UInt32 %
Returns the green_mask for the new bitmap.
blue_mask
Type: System..::.UInt32 %
Returns the blue_mask for the new bitmap.

Return Value

True in case a matching conversion exists; else false.

Version Information

FreeImage.NET

Supported in: 3.12.0, 3.13.0, 3.13.1

See Also