KoRgbU16ColorSpace::KoRgbU16ColorSpace() : KoSimpleColorSpace<KoBgrU16Traits>(colorSpaceId(), i18n("RGB (16-bit integer/channel, unmanaged)"), RGBAColorModelID, Integer16BitsColorDepthID) { }
GrayAU8ColorSpace::GrayAU8ColorSpace(const QString &name, KoColorProfile *p) : LcmsColorSpace<GrayAU8Traits>(colorSpaceId(), name, TYPE_GRAYA_8, cmsSigGrayData, p) { addChannel(new KoChannelInfo(i18n("Gray"), 0, 0, KoChannelInfo::COLOR, KoChannelInfo::UINT8)); addChannel(new KoChannelInfo(i18n("Alpha"), 1, 1, KoChannelInfo::ALPHA, KoChannelInfo::UINT8)); init(); addStandardCompositeOps<GrayAU8Traits>(this); }
XyzF32ColorSpace::XyzF32ColorSpace(const QString &name, KoColorProfile *p) : LcmsColorSpace<KoXyzF32Traits>(colorSpaceId(), name, TYPE_XYZA_FLT, cmsSigXYZData, p) { addChannel(new KoChannelInfo(i18n("X"), KoXyzF32Traits::x_pos * sizeof(float), KoXyzF32Traits::x_pos, KoChannelInfo::COLOR, KoChannelInfo::FLOAT32, sizeof(float), Qt::cyan)); addChannel(new KoChannelInfo(i18n("Y"), KoXyzF32Traits::y_pos * sizeof(float), KoXyzF32Traits::y_pos, KoChannelInfo::COLOR, KoChannelInfo::FLOAT32, sizeof(float), Qt::magenta)); addChannel(new KoChannelInfo(i18n("Z"), KoXyzF32Traits::z_pos * sizeof(float), KoXyzF32Traits::z_pos, KoChannelInfo::COLOR, KoChannelInfo::FLOAT32, sizeof(float), Qt::yellow)); addChannel(new KoChannelInfo(i18n("Alpha"), KoXyzF32Traits::alpha_pos * sizeof(float), KoXyzF32Traits::alpha_pos, KoChannelInfo::ALPHA, KoChannelInfo::FLOAT32, sizeof(float))); init(); addStandardCompositeOps<KoXyzF32Traits>(this); }
XyzU16ColorSpace::XyzU16ColorSpace(const QString &name, KoColorProfile *p) : LcmsColorSpace<KoXyzU16Traits>(colorSpaceId(), name, TYPE_XYZA_16, cmsSigXYZData, p) { addChannel(new KoChannelInfo(i18n("X"), KoXyzU16Traits::x_pos * sizeof(quint16), KoXyzU16Traits::x_pos, KoChannelInfo::COLOR, KoChannelInfo::UINT16, sizeof(quint16), Qt::cyan)); addChannel(new KoChannelInfo(i18n("Y"), KoXyzU16Traits::y_pos * sizeof(quint16), KoXyzU16Traits::y_pos, KoChannelInfo::COLOR, KoChannelInfo::UINT16, sizeof(quint16), Qt::magenta)); addChannel(new KoChannelInfo(i18n("Z"), KoXyzU16Traits::z_pos * sizeof(quint16), KoXyzU16Traits::z_pos, KoChannelInfo::COLOR, KoChannelInfo::UINT16, sizeof(quint16), Qt::yellow)); addChannel(new KoChannelInfo(i18n("Alpha"), KoXyzU16Traits::alpha_pos * sizeof(quint16), KoXyzU16Traits::alpha_pos, KoChannelInfo::ALPHA, KoChannelInfo::UINT16, sizeof(quint16))); init(); // ADD, ALPHA_DARKEN, BURN, DIVIDE, DODGE, ERASE, MULTIPLY, OVER, OVERLAY, SCREEN, SUBTRACT addStandardCompositeOps<KoXyzU16Traits>(this); }
YCbCrU8ColorSpace::YCbCrU8ColorSpace(const QString &name, KoColorProfile *p) : LcmsColorSpace<KoYCbCrU8Traits>(colorSpaceId(), name, TYPE_YCbCrA_8, cmsSigXYZData, p) { addChannel(new KoChannelInfo(i18n("Y"), KoYCbCrU8Traits::Y_pos * sizeof(quint8), KoYCbCrU8Traits::Y_pos, KoChannelInfo::COLOR, KoChannelInfo::UINT8, sizeof(quint8), Qt::cyan)); addChannel(new KoChannelInfo(i18n("Cb"), KoYCbCrU8Traits::Cb_pos * sizeof(quint8), KoYCbCrU8Traits::Cb_pos, KoChannelInfo::COLOR, KoChannelInfo::UINT8, sizeof(quint8), Qt::magenta)); addChannel(new KoChannelInfo(i18n("Cr"), KoYCbCrU8Traits::Cr_pos * sizeof(quint8), KoYCbCrU8Traits::Cr_pos, KoChannelInfo::COLOR, KoChannelInfo::UINT8, sizeof(quint8), Qt::yellow)); addChannel(new KoChannelInfo(i18n("Alpha"), KoYCbCrU8Traits::alpha_pos * sizeof(quint8), KoYCbCrU8Traits::alpha_pos, KoChannelInfo::ALPHA, KoChannelInfo::UINT8, sizeof(quint8))); init(); addStandardCompositeOps<KoYCbCrU8Traits>(this); }
LabU16ColorSpace::LabU16ColorSpace(const QString &name, KoColorProfile *p) : LcmsColorSpace<KoLabU16Traits>(colorSpaceId(), name, TYPE_LABA_16, cmsSigLabData, p) { addChannel(new KoChannelInfo(i18n("Lightness"), 0 * sizeof(quint16), 0, KoChannelInfo::COLOR, KoChannelInfo::UINT16, sizeof(quint16), QColor(100, 100, 100))); addChannel(new KoChannelInfo(i18n("a*"), 1 * sizeof(quint16), 1, KoChannelInfo::COLOR, KoChannelInfo::UINT16, sizeof(quint16), QColor(150, 150, 150))); addChannel(new KoChannelInfo(i18n("b*"), 2 * sizeof(quint16), 2, KoChannelInfo::COLOR, KoChannelInfo::UINT16, sizeof(quint16), QColor(200, 200, 200))); addChannel(new KoChannelInfo(i18n("Alpha"), 3 * sizeof(quint16), 3, KoChannelInfo::ALPHA, KoChannelInfo::UINT16, sizeof(quint16))); init(); addStandardCompositeOps<KoLabU16Traits>(this); }
CmykU8ColorSpace::CmykU8ColorSpace(const QString &name, KoColorProfile *p) : LcmsColorSpace<CmykU8Traits>(colorSpaceId(), name, TYPE_CMYKA_8, cmsSigCmykData, p) { addChannel(new KoChannelInfo(i18n("Cyan"), 0 * sizeof(quint8), 0, KoChannelInfo::COLOR, KoChannelInfo::UINT8, sizeof(quint8), Qt::cyan)); addChannel(new KoChannelInfo(i18n("Magenta"), 1 * sizeof(quint8), 1, KoChannelInfo::COLOR, KoChannelInfo::UINT8, sizeof(quint8), Qt::magenta)); addChannel(new KoChannelInfo(i18n("Yellow"), 2 * sizeof(quint8), 2, KoChannelInfo::COLOR, KoChannelInfo::UINT8, sizeof(quint8), Qt::yellow)); addChannel(new KoChannelInfo(i18n("Black"), 3 * sizeof(quint8), 3, KoChannelInfo::COLOR, KoChannelInfo::UINT8, sizeof(quint8), Qt::black)); addChannel(new KoChannelInfo(i18n("Alpha"), 4 * sizeof(quint8), 4, KoChannelInfo::ALPHA, KoChannelInfo::UINT8, sizeof(quint8))); init(); addStandardCompositeOps<CmykU8Traits>(this); }
RgbU16ColorSpace::RgbU16ColorSpace(const QString &name, KoColorProfile *p) : LcmsColorSpace<KoBgrU16Traits>(colorSpaceId(), name, TYPE_BGRA_16, cmsSigRgbData, p) { addChannel(new KoChannelInfo(i18n("Blue") , 0 * sizeof(quint16), 2, KoChannelInfo::COLOR, KoChannelInfo::UINT16, 2, QColor(0, 0, 255))); addChannel(new KoChannelInfo(i18n("Green"), 1 * sizeof(quint16), 1, KoChannelInfo::COLOR, KoChannelInfo::UINT16, 2, QColor(0, 255, 0))); addChannel(new KoChannelInfo(i18n("Red") , 2 * sizeof(quint16), 0, KoChannelInfo::COLOR, KoChannelInfo::UINT16, 2, QColor(255, 0, 0))); addChannel(new KoChannelInfo(i18n("Alpha"), 3 * sizeof(quint16), 3, KoChannelInfo::ALPHA, KoChannelInfo::UINT16, 2)); init(); addStandardCompositeOps<KoBgrU16Traits>(this); addCompositeOp(new RgbCompositeOpIn<KoBgrU16Traits>(this)); addCompositeOp(new RgbCompositeOpOut<KoBgrU16Traits>(this)); addCompositeOp(new RgbCompositeOpBumpmap<KoBgrU16Traits>(this)); }
XyzF32ColorSpace::XyzF32ColorSpace(const QString &name, KoColorProfile *p) : LcmsColorSpace<KoXyzF32Traits>(colorSpaceId(), name, TYPE_XYZA_FLT, cmsSigXYZData, p) { const IccColorProfile *icc_p = dynamic_cast<const IccColorProfile *>(p); Q_ASSERT(icc_p); QVector<KoChannelInfo::DoubleRange> uiRanges(icc_p->getFloatUIMinMax()); Q_ASSERT(uiRanges.size() == 3); addChannel(new KoChannelInfo(i18n("X"), KoXyzF32Traits::x_pos * sizeof(float), KoXyzF32Traits::x_pos, KoChannelInfo::COLOR, KoChannelInfo::FLOAT32, sizeof(float), Qt::cyan, uiRanges[0])); addChannel(new KoChannelInfo(i18n("Y"), KoXyzF32Traits::y_pos * sizeof(float), KoXyzF32Traits::y_pos, KoChannelInfo::COLOR, KoChannelInfo::FLOAT32, sizeof(float), Qt::magenta, uiRanges[1])); addChannel(new KoChannelInfo(i18n("Z"), KoXyzF32Traits::z_pos * sizeof(float), KoXyzF32Traits::z_pos, KoChannelInfo::COLOR, KoChannelInfo::FLOAT32, sizeof(float), Qt::yellow, uiRanges[2])); addChannel(new KoChannelInfo(i18n("Alpha"), KoXyzF32Traits::alpha_pos * sizeof(float), KoXyzF32Traits::alpha_pos, KoChannelInfo::ALPHA, KoChannelInfo::FLOAT32, sizeof(float))); init(); addStandardCompositeOps<KoXyzF32Traits>(this); }
RgbU16ColorSpace::RgbU16ColorSpace(KoColorProfile *p) : LcmsColorSpace<KoRgbU16Traits>(colorSpaceId(), i18n("RGB (16-bit integer/channel)"), TYPE_BGRA_16, icSigRgbData, p) { addChannel(new KoChannelInfo(i18n("Red"), 2*sizeof(quint16), 2, KoChannelInfo::COLOR, KoChannelInfo::UINT16, 2, QColor(255, 0, 0))); addChannel(new KoChannelInfo(i18n("Green"), 1*sizeof(quint16), 1, KoChannelInfo::COLOR, KoChannelInfo::UINT16, 2, QColor(0, 255, 0))); addChannel(new KoChannelInfo(i18n("Blue"), 0*sizeof(quint16), 0, KoChannelInfo::COLOR, KoChannelInfo::UINT16, 2, QColor(0, 0, 255))); addChannel(new KoChannelInfo(i18n("Alpha"), 3*sizeof(quint16), 3, KoChannelInfo::ALPHA, KoChannelInfo::UINT16, 2)); init(); addStandardCompositeOps<KoRgbU16Traits>(this); addCompositeOp(new RgbCompositeOpDarken<KoRgbU16Traits>(this)); addCompositeOp(new RgbCompositeOpLighten<KoRgbU16Traits>(this)); addCompositeOp(new RgbCompositeOpHue<KoRgbU16Traits>(this)); addCompositeOp(new RgbCompositeOpSaturation<KoRgbU16Traits>(this)); addCompositeOp(new RgbCompositeOpValue<KoRgbU16Traits>(this)); addCompositeOp(new RgbCompositeOpColor<KoRgbU16Traits>(this)); addCompositeOp(new RgbCompositeOpIn<KoRgbU16Traits>(this)); addCompositeOp(new RgbCompositeOpOut<KoRgbU16Traits>(this)); addCompositeOp(new RgbCompositeOpDiff<KoRgbU16Traits>(this)); addCompositeOp(new RgbCompositeOpBumpmap<KoRgbU16Traits>(this)); // addCompositeOp(new RgbCompositeOpClear<KoRgbU16Traits>(this)); addCompositeOp(new RgbCompositeOpDissolve<KoRgbU16Traits>(this)); }