IconExtensionsSaveAsIcon Method

KGy SOFT Drawing Libraries Help
Saves the icon into the specified stream. Unlike Icon.Save, this method can save every icon with high quality, even SystemIcons members, and icons created by the Icon.FromHandle method.

Namespace:  KGySoft.Drawing
Assembly:  KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 5.3.0
Syntax

public static void SaveAsIcon(
	this Icon icon,
	Stream stream,
	bool forceUncompressedResult = false
)

Parameters

icon
Type: System.DrawingIcon
The icon to save
stream
Type: System.IOStream
A stream into which the icon has to be saved.
forceUncompressedResult (Optional)
Type: SystemBoolean
 to force saving an uncompressed icon;  to allow PNG compression, which is supported by Windows Vista and above. This parameter is optional.
Default value: .

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Icon. 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

Reference