UtilIconProCreateIcon(Image, Boolean, Int32) Method
Creates a icon from the specified Image.
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(
Image img,
bool usePngCompression,
params int[] squareSizes
)
Public Shared Function CreateIcon (
img As Image,
usePngCompression As Boolean,
ParamArray squareSizes As Integer()
) As MemoryStream
Dim img As Image
Dim usePngCompression As Boolean
Dim squareSizes As Integer()
Dim returnValue As MemoryStream
returnValue = UtilIconPro.CreateIcon(img,
usePngCompression, squareSizes)
public:
static MemoryStream^ CreateIcon(
Image^ img,
bool usePngCompression,
... array<int>^ squareSizes
)
static member CreateIcon :
img : Image *
usePngCompression : bool *
squareSizes : int[] -> MemoryStream
No code example is currently available or this language may not be supported.
- img Image
-
The source Image.
- 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 img 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 img As Image = Image.FromFile(imgPath)
Using iconStream As MemoryStream = CreateIcon(img, 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.