|
Krita Source Code Documentation
|
#include <KoSimpleColorSpace.h>
Inheritance diagram for KoSimpleColorSpace< _CSTraits >:Public Member Functions | |
| KoID | colorDepthId () const override |
| void | colorFromXML (quint8 *, const QDomElement &) const override |
| KoID | colorModelId () const override |
| virtual QString | colorSpaceEngine () const |
| virtual quint32 | colorSpaceType () const |
| void | colorToXML (const quint8 *, QDomDocument &, QDomElement &) const override |
| bool | convertPixelsTo (const quint8 *src, quint8 *dst, const KoColorSpace *dstColorSpace, quint32 numPixels, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::ConversionFlags conversionFlags) const override |
| KoColorTransformation * | createBrightnessContrastAdjustment (const quint16 *) const override |
| KoColorTransformation * | createDarkenAdjustment (qint32, bool, qreal) const override |
| virtual KoColorTransformation * | createDesaturateAdjustment () const |
| KoColorTransformation * | createPerChannelAdjustment (const quint16 *const *) const override |
| quint8 | difference (const quint8 *src1, const quint8 *src2) const override |
| quint8 | differenceA (const quint8 *src1, const quint8 *src2) const override |
| QVector< double > | fromHSY (qreal *, qreal *, qreal *) const override |
| void | fromLabA16 (const quint8 *src, quint8 *dst, quint32 nPixels) const override |
| void | fromRgbA16 (const quint8 *src, quint8 *dst, quint32 nPixels) const override |
| QVector< double > | fromYUV (qreal *, qreal *, qreal *) const override |
| bool | hasHighDynamicRange () const override |
| virtual void | invertColor (quint8 *, qint32) const |
| KoSimpleColorSpace (const QString &id, const QString &name, const KoID &colorModelId, const KoID &colorDepthId) | |
| const KoColorProfile * | profile () const override |
| bool | profileIsCompatible (const KoColorProfile *) const override |
| void | toHSY (const QVector< double > &, qreal *, qreal *, qreal *) const override |
| void | toLabA16 (const quint8 *src, quint8 *dst, quint32 nPixels) const override |
| void | toRgbA16 (const quint8 *src, quint8 *dst, quint32 nPixels) const override |
| void | toYUV (const QVector< double > &, qreal *, qreal *, qreal *) const override |
| bool | willDegrade (ColorSpaceIndependence independence) const override |
| ~KoSimpleColorSpace () override | |
Public Member Functions inherited from KoColorSpaceAbstract< _CSTraits > | |
| quint32 | alphaPos () const override |
| void | applyAlphaNormedFloatMask (quint8 *pixels, const float *alpha, qint32 nPixels) const override |
| void | applyAlphaU8Mask (quint8 *pixels, const quint8 *alpha, qint32 nPixels) const override |
| void | applyInverseAlphaU8Mask (quint8 *pixels, const quint8 *alpha, qint32 nPixels) const override |
| void | applyInverseNormedFloatMask (quint8 *pixels, const float *alpha, qint32 nPixels) const override |
| quint32 | channelCount () const override |
| QString | channelValueText (const quint8 *pixel, quint32 channelIndex) const override |
| quint32 | colorChannelCount () const override |
| void | convertChannelToVisualRepresentation (const quint8 *src, quint8 *dst, quint32 nPixels, const QBitArray selectedChannels) const override |
| void | convertChannelToVisualRepresentation (const quint8 *src, quint8 *dst, quint32 nPixels, const qint32 selectedChannelIndex) const override |
| void | copyOpacityU8 (quint8 *src, quint8 *dst, qint32 nPixels) const override |
| KoColorTransformation * | createInvertTransformation () const override |
| void | fillGrayBrushWithColor (quint8 *dst, const QRgb *brush, quint8 *brushColor, qint32 nPixels) const override |
| void | fillInverseAlphaNormedFloatMaskWithColor (quint8 *pixels, const float *alpha, const quint8 *brushColor, qint32 nPixels) const override |
| void | fromNormalisedChannelsValue (quint8 *pixel, const QVector< float > &values) const override |
| quint8 | intensity8 (const quint8 *src) const override |
| qreal | intensityF (const quint8 *src) const override |
| KoColorSpaceAbstract (const QString &id, const QString &name) | |
| void | multiplyAlpha (quint8 *pixels, quint8 alpha, qint32 nPixels) const override |
| void | normalisedChannelsValue (const quint8 *pixel, QVector< float > &channels) const override |
| QString | normalisedChannelValueText (const quint8 *pixel, quint32 channelIndex) const override |
| qreal | opacityF (const quint8 *U8_pixel) const override |
| quint8 | opacityU8 (const quint8 *U8_pixel) const override |
| quint32 | pixelSize () const override |
| quint8 | scaleToU8 (const quint8 *srcPixel, qint32 channelIndex) const override |
| void | setOpacity (quint8 *pixels, qreal alpha, qint32 nPixels) const override |
| void | setOpacity (quint8 *pixels, quint8 alpha, qint32 nPixels) const override |
| void | singleChannelPixel (quint8 *dstPixel, const quint8 *srcPixel, quint32 channelIndex) const override |
| void | toQColor16 (const quint8 *src, QColor *c) const override |
Public Member Functions inherited from KoColorSpace | |
| virtual void | addCompositeOp (const KoCompositeOp *op) |
| virtual void | addDitherOp (KisDitherOp *op) |
| virtual void | bitBlt (const KoColorSpace *srcSpace, const KoCompositeOp::ParameterInfo ¶ms, const KoCompositeOp *op, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::ConversionFlags conversionFlags) const |
| QBitArray | channelFlags (bool color=true, bool alpha=false) const |
| QList< KoChannelInfo * > | channels () const |
| const KoCompositeOp * | compositeOp (const QString &id, const KoColorSpace *srcSpace=nullptr) const |
| virtual QList< KoCompositeOp * > | compositeOps () const |
| virtual QImage | convertToQImage (const quint8 *data, qint32 width, qint32 height, const KoColorProfile *dstProfile, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::ConversionFlags conversionFlags) const |
| virtual KoConvolutionOp * | convolutionOp () const |
| virtual KoColorConversionTransformation * | createColorConverter (const KoColorSpace *dstColorSpace, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::ConversionFlags conversionFlags) const |
| KoColorTransformation * | createColorTransformation (const QString &id, const QHash< QString, QVariant > ¶meters) const |
| virtual KoColorConversionTransformation * | createProofingTransform (const KoColorSpace *dstColorSpace, const KoColorSpace *proofingSpace, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::Intent proofingIntent, bool bpcFirstTransform, quint8 *gamutWarning, KoColorConversionTransformation::ConversionFlags displayConversionFlags) const |
| createProofingTransform Create a proofing transform. This is a two part transform that can also do gamut checks. The first transform is from source -> proofing space. Here the gamut checks are performed. The second is the proofing to destination space. | |
| virtual void | decreaseHue (quint8 *pixel, qreal step) const |
| virtual void | decreaseLuminosity (quint8 *pixel, qreal step) const |
| virtual void | decreaseSaturation (quint8 *pixel, qreal step) const |
| virtual const KisDitherOp * | ditherOp (const QString &depth, DitherType type) const |
| QPolygonF | estimatedTRCXYY () const |
| virtual void | fillGrayBrushWithColorAndLightnessOverlay (quint8 *dst, const QRgb *brush, quint8 *brushColor, qint32 nPixels) const |
| virtual void | fillGrayBrushWithColorAndLightnessWithStrength (quint8 *dst, const QRgb *brush, quint8 *brushColor, qreal strength, qint32 nPixels) const |
| virtual void | fromQColor (const QColor &color, quint8 *dst) const =0 |
| QPolygonF | gamutXYY () const |
| virtual bool | hasCompositeOp (const QString &id, const KoColorSpace *srcSpace=nullptr) const |
| QString | id () const |
| virtual void | increaseBlue (quint8 *pixel, qreal step) const |
| virtual void | increaseGreen (quint8 *pixel, qreal step) const |
| virtual void | increaseHue (quint8 *pixel, qreal step) const |
| virtual void | increaseLuminosity (quint8 *pixel, qreal step) const |
| virtual void | increaseRed (quint8 *pixel, qreal step) const |
| virtual void | increaseSaturation (quint8 *pixel, qreal step) const |
| virtual void | increaseYellow (quint8 *pixel, qreal step) const |
| KoColorSpace (const QString &id, const QString &name, KoMixColorsOp *mixColorsOp, KoConvolutionOp *convolutionOp) | |
| Should be called by real color spaces. | |
| QVector< qreal > | lumaCoefficients () const |
| virtual KoMixColorsOp * | mixColorsOp () const |
| virtual void | modulateLightnessByGrayBrush (quint8 *dst, const QRgb *brush, qreal strength, qint32 nPixels) const |
| QString | name () const |
| virtual bool | operator== (const KoColorSpace &rhs) const |
| virtual bool | proofPixelsTo (const quint8 *src, quint8 *dst, quint32 numPixels, KoColorConversionTransformation *proofingTransform) const |
| proofPixelsTo | |
| virtual void | toQColor (const quint8 *src, QColor *c) const =0 |
| virtual void | transparentColor (quint8 *dst, quint32 nPixels) const |
Public Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Private Attributes | |
| KoID | m_colorDepthId |
| KoID | m_colorModelId |
| QString | m_name |
| KoColorProfile * | m_profile |
Definition at line 20 of file KoSimpleColorSpace.h.
|
inline |
Definition at line 25 of file KoSimpleColorSpace.h.
|
inlineoverride |
Definition at line 36 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::m_profile.
|
inlineoverridevirtual |
Implements KoColorSpace.
Definition at line 44 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::m_colorDepthId.
|
inlineoverridevirtual |
Unserialize a color following Create's swatch color specification available at https://web.archive.org/web/20110826002520/http://create.freedesktop.org/wiki/Swatches_-_color_file_format/Draft
| pixel | buffer where the color will be unserialized |
| elt | the element to unserialize (<CMYK />, <sRGB />, <RGB />) |
Implements KoColorSpace.
Definition at line 111 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::m_name, and warnPigment.
|
inlineoverridevirtual |
Implements KoColorSpace.
Definition at line 40 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::m_colorModelId.
|
inlinevirtual |
Definition at line 204 of file KoSimpleColorSpace.h.
|
inlinevirtual |
Definition at line 71 of file KoSimpleColorSpace.h.
|
inlineoverridevirtual |
Serialize this color following Create's swatch color specification available at https://web.archive.org/web/20110826002520/http://create.freedesktop.org/wiki/Swatches_-_color_file_format/Draft
This function doesn't create the <color /> element but rather the <CMYK />, <sRGB />, <RGB /> ... elements. It is assumed that colorElt is the <color /> element.
| pixel | buffer to serialized |
| colorElt | root element for the serialization, it is assumed that this element is <color /> |
| doc | is the document containing colorElt |
Implements KoColorSpace.
Definition at line 107 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::m_name, and warnPigment.
|
inlineoverridevirtual |
Convert a byte array of srcLen pixels *src to the specified color space and put the converted bytes into the prepared byte array *dst.
Returns false if the conversion failed, true if it succeeded
This function is not thread-safe. If you want to apply multiple conversion in different threads at the same time, you need to create one color converter per-thread using createColorConverter.
Reimplemented from KoColorSpace.
Definition at line 177 of file KoSimpleColorSpace.h.
References KoColorSpace::fromQColor(), KoColorSpace::pixelSize(), KoColorSpaceAbstract< _CSTraits >::pixelSize(), and KoColorSpace::toQColor().
|
inlineoverridevirtual |
Create an adjustment object for adjusting the brightness and contrast transferValues is a 256 bins array with values from 0 to 0xFFFF This function is thread-safe, but you need to create one KoColorTransformation per thread.
Implements KoColorSpace.
Definition at line 83 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::m_name, and warnPigment.
|
inlineoverridevirtual |
Darken all color channels with the given amount. If compensate is true, the compensation factor will be used to limit the darkening.
Reimplemented from KoColorSpaceAbstract< _CSTraits >.
Definition at line 98 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::m_name, and warnPigment.
|
inlinevirtual |
Definition at line 88 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::m_name, and warnPigment.
|
inlineoverridevirtual |
Create an adjustment object for adjusting individual channels transferValues is an array of colorChannelCount number of 256 bins array with values from 0 to 0xFFFF This function is thread-safe, but you need to create one KoColorTransformation per thread.
The layout of the channels must be the following:
0..N-2 - color channels of the pixel; N-1 - alpha channel of the pixel (if exists)
Implements KoColorSpace.
Definition at line 93 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::m_name, and warnPigment.
|
inlineoverridevirtual |
Get the difference between 2 colors, normalized in the range (0,255). Only completely opaque and completely transparent are taken into account when computing the difference; other transparency levels are not regarded when finding the difference.
Completely transparent pixels are treated as if they are completely different from any non-transparent pixels.
Implements KoColorSpace.
Definition at line 57 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::m_name, and warnPigment.
|
inlineoverridevirtual |
Get the difference between 2 colors, normalized in the range (0,255). This function takes the Alpha channel of the pixel into account. Alpha channel has the same weight as Lightness channel.
Completely transparent pixels are treated as if their color channels are the same as ones of the other pixel. In other words, only alpha channel difference is compared.
Implements KoColorSpace.
Definition at line 64 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::m_name, and warnPigment.
|
inlineoverridevirtual |
Implements KoColorSpace.
Definition at line 117 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::m_name, and warnPigment.
|
inlineoverridevirtual |
Convert the specified data from Lab (D50). to this colorspace. All colorspaces are guaranteed to support this.
| src | the pixels in 16 bit lab format |
| dst | the destination data |
| nPixels | the number of pixels in the array |
Reimplemented from KoColorSpace.
Definition at line 144 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::colorDepthId(), KoSimpleColorSpace< _CSTraits >::colorModelId(), KoColorSpace::convertPixelsTo(), KoColorSpaceRegistry::instance(), Integer16BitsColorDepthID, KoColorConversionTransformation::internalConversionFlags(), KoColorConversionTransformation::internalRenderingIntent(), KoColorSpaceRegistry::lab16(), and LABAColorModelID.
|
inlineoverridevirtual |
Convert the specified data from sRGB 16 bits. to this colorspace. All colorspaces are guaranteed to support this.
| src | the pixels in 16 bit rgb format |
| dst | the destination data |
| nPixels | the number of pixels in the array |
Reimplemented from KoColorSpace.
Definition at line 166 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::colorDepthId(), KoSimpleColorSpace< _CSTraits >::colorModelId(), KoColorSpace::convertPixelsTo(), KoColorSpaceRegistry::instance(), Integer16BitsColorDepthID, KoColorConversionTransformation::internalConversionFlags(), KoColorConversionTransformation::internalRenderingIntent(), KoColorSpaceRegistry::rgb16(), and RGBAColorModelID.
|
inlineoverridevirtual |
Implements KoColorSpace.
Definition at line 126 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::m_name, and warnPigment.
|
inlineoverridevirtual |
Returns true if the colorspace supports channel values outside the (normalised) range 0 to 1.
Implements KoColorSpace.
Definition at line 75 of file KoSimpleColorSpace.h.
|
inlinevirtual |
Definition at line 103 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::m_name, and warnPigment.
|
inlineoverridevirtual |
Return the profile of this color space.
Implements KoColorSpace.
Definition at line 79 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::m_profile.
|
inlineoverridevirtual |
Implements KoColorSpace.
Definition at line 53 of file KoSimpleColorSpace.h.
|
inlineoverridevirtual |
Implements KoColorSpace.
Definition at line 114 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::m_name, and warnPigment.
|
inlineoverridevirtual |
Convert the specified data to Lab (D50). All colorspaces are guaranteed to support this
| src | the source data |
| dst | the destination data |
| nPixels | the number of source pixels |
Reimplemented from KoColorSpace.
Definition at line 133 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::colorDepthId(), KoSimpleColorSpace< _CSTraits >::colorModelId(), KoSimpleColorSpace< _CSTraits >::convertPixelsTo(), KoColorSpaceRegistry::instance(), Integer16BitsColorDepthID, KoColorConversionTransformation::internalConversionFlags(), KoColorConversionTransformation::internalRenderingIntent(), KoColorSpaceRegistry::lab16(), and LABAColorModelID.
|
inlineoverridevirtual |
Convert the specified data to sRGB 16 bits. All colorspaces are guaranteed to support this
| src | the source data |
| dst | the destination data |
| nPixels | the number of source pixels |
Reimplemented from KoColorSpace.
Definition at line 155 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::colorDepthId(), KoSimpleColorSpace< _CSTraits >::colorModelId(), KoSimpleColorSpace< _CSTraits >::convertPixelsTo(), KoColorSpaceRegistry::instance(), Integer16BitsColorDepthID, KoColorConversionTransformation::internalConversionFlags(), KoColorConversionTransformation::internalRenderingIntent(), KoColorSpaceRegistry::rgb16(), and RGBAColorModelID.
|
inlineoverridevirtual |
Implements KoColorSpace.
Definition at line 123 of file KoSimpleColorSpace.h.
References KoSimpleColorSpace< _CSTraits >::m_name, and warnPigment.
|
inlineoverridevirtual |
If false, images in this colorspace will degrade considerably by functions, tools and filters that have the given measure of colorspace independence.
| independence | the measure to which this colorspace will suffer from the manipulations of the tool or filter asking |
Implements KoColorSpace.
Definition at line 48 of file KoSimpleColorSpace.h.
|
private |
Definition at line 211 of file KoSimpleColorSpace.h.
|
private |
Definition at line 210 of file KoSimpleColorSpace.h.
|
private |
Definition at line 209 of file KoSimpleColorSpace.h.
|
private |
Definition at line 212 of file KoSimpleColorSpace.h.