Class Image
- Namespace
- FileFormat.Cells
- Assembly
- FileFormat.Cells.dll
Represents an image, providing methods and properties to handle its path, data, and extension.
public class Image
- Inheritance
-
Image
- Inherited Members
Constructors
Image(Stream, string)
Initializes a new instance of the Image class using a stream and a file extension.
public Image(Stream data, string extension)
Parameters
Exceptions
- ArgumentNullException
Thrown when
data
orextension
is null.
Image(string)
Initializes a new instance of the Image class using a file path.
public Image(string path)
Parameters
path
stringThe path to the image file.
Exceptions
- ArgumentException
Thrown when
path
is null or empty or when the file does not exist.
Properties
Data
Gets the stream data of the image if initialized using a stream.
public Stream Data { get; }
Property Value
Extension
Gets the file extension of the image.
public string Extension { get; }
Property Value
Path
Gets the path of the image if initialized using a file path.
public string Path { get; }