colour_hdri.Image#

class colour_hdri.Image(path: str | None = None, data: ArrayLike | None = None, metadata: Metadata | None = None)[source]#

Bases: object

Define the base object for storing an image along its path, pixel data and metadata needed for HDRIs generation.

Parameters:
  • path (str | None) – Image path.

  • data (ArrayLike | None) – Image pixel data array.

  • metadata (Metadata | None) – Image exif metadata.

Attributes

Methods

property path: str | None#

Getter and setter property for the image path.

Parameters:

value – Value to set the image path with.

Returns:

Image path.

Return type:

None or str

property data: NDArrayFloat | None#

Getter and setter property for the image data.

Parameters:

value – Value to set the image data with.

Returns:

Image data.

Return type:

None or numpy.ndarray

property metadata: Metadata | None#

Getter and setter property for the image metadata.

Parameters:

value – Value to set the image metadata with.

Returns:

Image metadata.

Return type:

None or colour_hdri.Metadata

read_data(cctf_decoding: Callable | None = None) NDArrayFloat[source]#

Read image pixel data at Image.path attribute.

Parameters:

cctf_decoding (Callable | None) – Decoding colour component transfer function (Decoding CCTF) or electro-optical transfer function (EOTF / EOCF).

Returns:

Image pixel data.

Return type:

numpy.ndarray

Raises:

ValueError – If the image path is undefined.

read_metadata() Metadata[source]#

Read image relevant exif metadata at Image.path attribute.

Returns:

Image relevant exif metadata.

Return type:

colour_hdri.Metadata

Raises:

ValueError – If the image path is undefined.