BitmapExtensionsApplyColorMatrix(Bitmap, ColorMatrix) Method
Applies a custom color matrix to an Bitmap.
Namespace: DevCase.Extensions.BitmapExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static Bitmap ApplyColorMatrix(
this Bitmap sender,
ColorMatrix colorMatrix
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function ApplyColorMatrix (
sender As Bitmap,
colorMatrix As ColorMatrix
) As Bitmap
Dim sender As Bitmap
Dim colorMatrix As ColorMatrix
Dim returnValue As Bitmap
returnValue = sender.ApplyColorMatrix(colorMatrix)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static Bitmap^ ApplyColorMatrix(
Bitmap^ sender,
ColorMatrix^ colorMatrix
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member ApplyColorMatrix :
sender : Bitmap *
colorMatrix : ColorMatrix -> Bitmap
No code example is currently available or this language may not be supported.
- sender Bitmap
-
The source Bitmap.
- colorMatrix ColorMatrix
-
The color matrix to apply to the source image.
Bitmap
The resulting
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).
This is a code example.
No code example is currently available or this language may not be supported.
Dim grayscaleMatrix As New ColorMatrix({New Single() {0.3F, 0.3F, 0.3F, 0, 0},
New Single() {0.59F, 0.59F, 0.59F, 0, 0},
New Single() {0.11F, 0.11F, 0.11F, 0, 0},
New Single() {0, 0, 0, 1, 0},
New Single() {0, 0, 0, 0, 1}})
Dim bmp As Bitmap = Bitmap.FromFile("C:\File.png").ApplyColorMatrix(grayscaleMatrix)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.