PixelFormatExtensionsGetInfo Method

Gets a PixelFormatInfo for this pixelFormat. Please note that this may return a different result than calling ToKnownPixelFormat().GetInfo() because the IsCustomFormat in the result of this method can be if the actual pixel layout of the specified pixelFormat differs from the layout of its KnownPixelFormat counterpart with the same name.

Definition

Namespace: KGySoft.Drawing
Assembly: KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 8.1.0
C#
public static PixelFormatInfo GetInfo(
	this PixelFormat pixelFormat
)

Parameters

pixelFormat  PixelFormat
The PixelFormat to retrieve a PixelFormatInfo for.

Return Value

PixelFormatInfo
A PixelFormatInfo representing the specified pixelFormat.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type PixelFormat. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

ArgumentOutOfRangeExceptionpixelFormat must be a valid format.

See Also