Table of Contents

Method FromImage

Namespace
OpenCAD2D.Plugins
Assembly
OpenCAD2D.Core.dll

FromImage(byte[])

Makes an icon from the bytes of an image file: PNG, BMP, JPEG, GIF or ICO. The bytes are copied.

public static CadPluginIcon FromImage(byte[] image)

Parameters

image byte[]

The bytes. The window falls back to the presenter's plugin icon where it cannot decode them, and logs one Warn.

Returns

CadPluginIcon

The icon.

Exceptions

ArgumentNullException

Thrown when the bytes are null.

ArgumentException

Thrown when there are no bytes.