Ocean
Ocean::Media::Image::Properties Class Reference

Definition of a class holding properties. More...

Public Member Functions

 Properties ()=default
 Default constructor. More...
 
 Properties (const float quality, std::string &&colorProfileName=std::string())
 Creates a new properties object. More...
 
bool isValid () const
 Returns whether this object holds valid parameters. More...
 

Data Fields

float quality_ = -1.0f
 The quality to be used when encoding or decoding an image, with range [0, 1], -1 if default quality or unknown. More...
 
std::string colorProfileName_
 The name of the color profile, empty if unknown. More...
 

Detailed Description

Definition of a class holding properties.

Note: Depending on the image format, a provided property like a quality value may not have any impact, e.g., png images do not support a loosely compression.

Constructor & Destructor Documentation

◆ Properties() [1/2]

Ocean::Media::Image::Properties::Properties ( )
default

Default constructor.

◆ Properties() [2/2]

Ocean::Media::Image::Properties::Properties ( const float  quality,
std::string &&  colorProfileName = std::string() 
)
inlineexplicit

Creates a new properties object.

Parameters
qualityThe quality to be used, with range [0, 1], -1 if unknown or default quality
colorProfileNameThe optional name of the color profile, e.g., "sRGB IEC61966-2.1", or "Adobe RGB (1998)"

Member Function Documentation

◆ isValid()

bool Ocean::Media::Image::Properties::isValid ( ) const
inline

Returns whether this object holds valid parameters.

Returns
True, if so

Field Documentation

◆ colorProfileName_

std::string Ocean::Media::Image::Properties::colorProfileName_

The name of the color profile, empty if unknown.

◆ quality_

float Ocean::Media::Image::Properties::quality_ = -1.0f

The quality to be used when encoding or decoding an image, with range [0, 1], -1 if default quality or unknown.


The documentation for this class was generated from the following file: