BitmapExtensionsGetColorCount Method
Gets the actual number of colors of the specified bitmap. Colors are counted even for indexed bitmaps.
Namespace: KGySoft.DrawingAssembly: KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 9.2.0
public static int GetColorCount(
this Bitmap bitmap
)
<ExtensionAttribute>
Public Shared Function GetColorCount (
bitmap As Bitmap
) As Integer
public:
[ExtensionAttribute]
static int GetColorCount(
Bitmap^ bitmap
)
[<ExtensionAttribute>]
static member GetColorCount :
bitmap : Bitmap -> int
- bitmap Bitmap
- The bitmap, whose colors have to be counted to count its colors.
Int32The actual number of colors of the specified
bitmap.In Visual Basic and C#, you can call this method as an instance method on any object of type
Bitmap. 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).