HeifContext(Stream, Boolean) Constructor

Initializes a new instance of the HeifContext class with the specified stream to read from, and optionally leaves the stream open.

Definition

Namespace: LibHeifSharp
Assembly: LibHeifSharp (in LibHeifSharp.dll) Version: 3.2.0
C#
public HeifContext(
	Stream stream,
	bool leaveOpen = false
)

Parameters

stream  Stream
The stream to read from.
leaveOpen  Boolean  (Optional)
to leave the stream open after the HeifContext object is disposed; otherwise, .

Exceptions

ArgumentNullExceptionstream is null.
ArgumentExceptionstream must support reading and seeking.
HeifException Unable to create the native HeifContext. -or- The LibHeif version is not supported. -or- A LibHeif error occurred.

See Also