Table of Contents

Method CanRead

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

CanRead(string?)

Returns true if at least one of the available image handlers can read the file with the given name.

public static bool CanRead(string? url)

Parameters

url string

Path or url to file with image data.

Returns

bool

CanRead(Stream)

Returns true if at least one of the available image handlers can read the data in the given stream.

public static bool CanRead(Stream stream)

Parameters

stream Stream

Opened input stream from which to load the image. Currently, the stream must support seeking.

Returns

bool

Remarks

This function doesn't modify the current stream position (because it restores the original position before returning; this however requires the stream to be seekable).