IconExtensionsSaveAsIcon Method

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.

Definition

Namespace: KGySoft.Drawing
Assembly: KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 10.0.0-rc.1
C#
public static void SaveAsIcon(
	this Icon icon,
	Stream stream,
	bool forceUncompressedResult = false
)

Parameters

icon  Icon
The icon to save
stream  Stream
A stream into which the icon has to be saved.
forceUncompressedResult  Boolean  (Optional)
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