XImage FromFile Function. Creates an XImage from a file path. ABCpdf .NET PDF Library.

ABCpdf .net

 
   

Creates an XImage from a file path.

 

   
Syntax  

[C#]
static XImage FromFile(string path, XReadOptions options)

[Visual Basic]
Shared Function FromFile(path As String, options As XReadOptions) As XImage

Throws Exceptions may throw Exception()

 

   

Params
 
Name Description
path The path to the graphic file.
options The settings for the read. The XImage takes ownership of this parameter. Relevant property for Default ReadModule: PreserveTransparency.
return The 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 SetFile method except that the image holds additional information (PreserveTransparency). In addition this method allows you to read any document format and treat it as an image. See the Doc.Read method for details of supported document formats.

For modules that use an Operation (whether Operation is actually null or not), if NeedsFile is true, the file specified must exist as long as the XImage object is not cleared, disposed of, or garbage-collected. The object does not delete the file when it is disposed of.

 

   

Example
 

None.