Method ConvertBitmapToIcon
ConvertBitmapToIcon(Stream, Stream, int, bool)
Converts a BMP image to an icon (ICO) file
Declaration
public static void ConvertBitmapToIcon(Stream input, Stream output, int size = 64, bool preserveAspectRatio = true)
Parameters
Type | Name | Description |
---|---|---|
Stream | input | The input stream of BMP image. |
Stream | output | The output stream for the ICO file. |
int | size | Icon size, must be a standard icon dimension (e.g., 16, 32, 48, etc.). |
bool | preserveAspectRatio | Indicates whether the aspect ratio should be preserved. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown when input parameters are invalid. |