colour_hdri.Image#

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

Bases: object

Define the base object for storing an image along its path, pixel data and metadata needed for HDRI / radiance images generation.

Parameters:
  • path (Optional[str]) – Image path.

  • data (Optional[ArrayLike]) – Image pixel data array.

  • metadata (Optional[Metadata]) – Image exif metadata.

Attributes

Methods

property path: Optional[str]#

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: Optional[ndarray]#

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: Optional[Metadata]#

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: Optional[Callable] = None) ndarray[source]#

Read image pixel data at Image.path attribute.

Parameters:

cctf_decoding (Optional[Callable]) – 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.