Table of Contents

Method LoadFromStream

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

LoadFromStream(Stream, BitmapType, int)

Loads an image from an input stream.

public virtual bool LoadFromStream(Stream stream, BitmapType bitmapType = BitmapType.Any, int index = -1)

Parameters

stream Stream

Input stream with image data.

bitmapType BitmapType

Type of the bitmap. Depending on how library and OS has been configured and by which handlers have been loaded, not all formats may be available. If value is Any, function will try to autodetect the format.

index int

See description in GenericImage(string?, BitmapType, int)

Returns

bool

true if the call succeeded, false otherwise.

LoadFromStream(Stream, string, int)

Loads an image from an input stream.

public virtual bool LoadFromStream(Stream stream, string mimetype, int index = -1)

Parameters

stream Stream

Input stream with image data.

mimetype string

MIME type string (for example 'image/jpeg').

index int

See description in GenericImage(string?, BitmapType, int)

Returns

bool

true if the call succeeded, false otherwise.