CodecRegistry.TryCreateReader Method

Creates an appropriate image reader for the specified stream, or returns null if the format cannot be recognized.

Namespace: Aurigma.GraphicsMill.Codecs
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public ImageReader TryCreateReader(
	Stream stream
)

Parameters

stream

Type: System.IO.Stream

A Stream to create a reader for.

Return Value

An ImageReader for the recognized format, or null if the format could not be recognized.

Remarks

Unlike CreateReader(Stream), this method does not throw an exception when the format cannot be recognized, which makes it convenient for handling multiple files or user uploads of unknown format.

See Also

Reference