Table of Contents

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

data Stream

The stream containing the image data.

extension string

The file extension of the image.

Exceptions

ArgumentNullException

Thrown when data or extension is null.

Image(string)

Initializes a new instance of the Image class using a file path.

public Image(string path)

Parameters

path string

The 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

Stream

Extension

Gets the file extension of the image.

public string Extension { get; }

Property Value

string

Path

Gets the path of the image if initialized using a file path.

public string Path { get; }

Property Value

string