digiKam
Loading...
Searching...
No Matches
Digikam::CurvesContainer Class Reference

#include <curvescontainer.h>

Public Member Functions

 CurvesContainer ()=default
 
 CurvesContainer (int type, bool sixteenBit)
 
void initialize ()
 
bool isEmpty () const
 
bool isStoredLosslessly () const
 
bool operator== (const CurvesContainer &other) const
 
void writeToFilterAction (FilterAction &action, const QString &prefix=QString()) const
 

Static Public Member Functions

static CurvesContainer fromFilterAction (const FilterAction &action, const QString &prefix=QString())
 

Public Attributes

int curvesType = ImageCurves::CURVE_SMOOTH
 
bool sixteenBit = false
 
QPolygon values [ColorChannels]
 

Constructor & Destructor Documentation

◆ CurvesContainer() [1/2]

Digikam::CurvesContainer::CurvesContainer ( )
default

Provides a convenient storage for a curve. Initially, the values are empty. Call initialize() before adjusting values manually.

References Digikam::operator==().

Referenced by fromFilterAction().

◆ CurvesContainer() [2/2]

Digikam::CurvesContainer::CurvesContainer ( int  type,
bool  sixteenBit 
)

Member Function Documentation

◆ fromFilterAction()

◆ initialize()

void Digikam::CurvesContainer::initialize ( )

Fills the values with a linear curve suitable for type and sixteenBit parameters.

References Digikam::ColorChannels, Digikam::ImageCurves::CURVE_FREE, curvesType, Digikam::ImageCurves::NUMBER_OF_POINTS, sixteenBit, and values.

Referenced by Digikam::ImageCurves::getContainer().

◆ isEmpty()

bool Digikam::CurvesContainer::isEmpty ( ) const

An empty container is interpreted as a linear curve. A non-empty container can also be linear; test for isLinear() of the resulting ImageCurves. Note: If an ImageCurves is linear, it will return an empty container.

References Digikam::ColorChannels, isEmpty(), and values.

Referenced by Digikam::RawProcessingFilter::filterImage(), isEmpty(), operator==(), Digikam::DRawDecoding::postProcessingSettingsIsDirty(), writeToFilterAction(), and Digikam::DRawDecoding::writeToFilterAction().

◆ isStoredLosslessly()

bool Digikam::CurvesContainer::isStoredLosslessly ( ) const

Serialize from and to FilterAction. isStoredLosslessly returns false if the curve cannot be losslessly stored in XML because it would be too large (free 16 bit). It is then lossily compressed.

References Digikam::ImageCurves::CURVE_FREE, curvesType, and sixteenBit.

Referenced by Digikam::CurvesFilter::filterAction().

◆ operator==()

bool Digikam::CurvesContainer::operator== ( const CurvesContainer other) const

◆ writeToFilterAction()

Member Data Documentation

◆ curvesType

int Digikam::CurvesContainer::curvesType = ImageCurves::CURVE_SMOOTH

Smooth : QPolygon have size of 18 points. Free : QPolygon have size of 255 or 65535 values.

Referenced by initialize(), isStoredLosslessly(), operator==(), and Digikam::ImageCurves::setContainer().

◆ sixteenBit

bool Digikam::CurvesContainer::sixteenBit = false

◆ values


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