UtilIconProCreateIcon(Bitmap, Boolean, Int32) Method
Creates a icon from the specified Bitmap.
Namespace: DevCase.ThirdParty.IconProAssembly: DevCase.net48.ThirdParty.IconPro (in DevCase.net48.ThirdParty.IconPro.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static MemoryStream CreateIcon(
Bitmap bmp,
bool usePngCompression,
params int[] squareSizes
)
Public Shared Function CreateIcon (
bmp As Bitmap,
usePngCompression As Boolean,
ParamArray squareSizes As Integer()
) As MemoryStream
Dim bmp As Bitmap
Dim usePngCompression As Boolean
Dim squareSizes As Integer()
Dim returnValue As MemoryStream
returnValue = UtilIconPro.CreateIcon(bmp,
usePngCompression, squareSizes)
public:
static MemoryStream^ CreateIcon(
Bitmap^ bmp,
bool usePngCompression,
... array<int>^ squareSizes
)
static member CreateIcon :
bmp : Bitmap *
usePngCompression : bool *
squareSizes : int[] -> MemoryStream
No code example is currently available or this language may not be supported.
- bmp Bitmap
-
The source Bitmap.
- usePngCompression Boolean
-
If set to , use PNG compression.
- squareSizes Int32
-
The square sizes to include in the icon (eg. 16 = 16x16, 32 = 32x32, etc).
If no value is specified, the size of the source image specified at bmp will be used.
MemoryStream
A
MemoryStream that contains the raw icon data. Save the stream to disk to create a icon file.
This is a code example.
No code example is currently available or this language may not be supported.
Dim imgPath As String = "C:\Image.png"
Dim bmp As Bitmap = DirectCast(Bitmap.FromFile(imgPath), Bitmap)
Using iconStream As MemoryStream = CreateIcon(bmp, True, 16, 24, 32, 48, 64, 96, 128, 256),
output As New FileStream("C:\New Icon.ico", FileMode.CreateNew, FileAccess.Write, FileShare.Read)
iconStream.WriteTo(output)
End Using
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.