![]() |
|
ImageExtensionsToGrayscale Method | KGy SOFT Drawing Libraries Help |
Converts an image to a grayscale one.
Namespace: KGySoft.Drawing
Assembly: KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 4.6.0
Syntax
public static Image ToGrayscale( this Image image )
<ExtensionAttribute> Public Shared Function ToGrayscale ( image As Image ) As Image
public: [ExtensionAttribute] static Image^ ToGrayscale( Image^ image )
[<ExtensionAttribute>] static member ToGrayscale : image : Image -> Image
Parameters
- image
- Type: System.DrawingImage
The image to convert to grayscale.
Return Value
Type: ImageThe grayscale version of the original image.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Image. 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).See Also