BitmapExtensionsToIcon(Bitmap, Size, Boolean, Color) Method
Converts a Bitmap to a Icon
of the specified size.
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 Icon ToIcon(
this Bitmap bmp,
Size size,
bool makeTransparent = false,
Color transparentColor = default
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function ToIcon (
bmp As Bitmap,
size As Size,
Optional makeTransparent As Boolean = false,
Optional transparentColor As Color = Nothing
) As Icon
Dim bmp As Bitmap
Dim size As Size
Dim makeTransparent As Boolean
Dim transparentColor As Color
Dim returnValue As Icon
returnValue = bmp.ToIcon(size, makeTransparent,
transparentColor)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static Icon^ ToIcon(
Bitmap^ bmp,
Size size,
bool makeTransparent = false,
Color transparentColor = Color()
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member ToIcon :
bmp : Bitmap *
size : Size *
?makeTransparent : bool *
?transparentColor : Color
(* Defaults:
let _makeTransparent = defaultArg makeTransparent false
let _transparentColor = defaultArg transparentColor new Color()
*)
-> Icon
No code example is currently available or this language may not be supported.
- bmp Bitmap
-
The source Bitmap.
- size Size
-
The output icon size.
- makeTransparent Boolean (Optional)
-
Optional. If True, makes transparent the output icon. Default value is false.
- transparentColor Color (Optional)
-
Optional. The color used to make transparent the output icon. Default value is null.
Icon
The resulting
Icon.
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).