XImage FromStream Function. Creates an XImage from a Stream. ABCpdf .NET PDF Library.

ABCpdf .net

 
  

Creates an XImage from a Stream.

 

  
Syntax 

[C#]
static XImage FromStream(Stream stream, XReadOptions options)

[Visual Basic]
Shared Function FromStream(stream As Stream, options As XReadOptions) As XImage

Throws Exceptions may throw Exception()

 

  

Params
 
NameDescription
streamThe stream containing the graphic.
optionsThe settings for the read. The XImage takes ownership of this parameter. Relevant property for Default ReadModule: PreserveTransparency.
returnThe resulting IndirectObject.

 

  

Notes
 

The object takes the ownership of the XReadOptions, which is disposed of when the object is disposed of. You can make the object release the ownership without disposing of the XReadOptions using the parameterized overloads of Dispose and Clear. The XReadOptions must not be modified as long as the object has the ownership.

For Default ReadModule, this method provides the same functionality as the SetStream method except that the image holds additional information (PreserveTransparency).

For modules that use an Operation (whether Operation is actually null or not), if NeedsStream is true, the object takes the ownership of the Stream, which is disposed of when the object is disposed of. You can make the object release the ownership without disposing of the Stream using the parameterized overloads of Dispose and Clear. The Stream must not be modified as long as the XImage object is not cleared, disposed of, or garbage-collected.

If NeedsStream is false, the caller is responsible for closing or disposing of the Stream.

 

  

Example
 

None.