diff --git a/plugins/color/lcms2engine/colorspaces/cmyk_f32/CmykF32ColorSpace.h b/plugins/color/lcms2engine/colorspaces/cmyk_f32/CmykF32ColorSpace.h index 8f36cf61f4..d332c3997e 100644 --- a/plugins/color/lcms2engine/colorspaces/cmyk_f32/CmykF32ColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/cmyk_f32/CmykF32ColorSpace.h @@ -1,125 +1,125 @@ /* * Copyright (c) 2006 Cyrille Berger * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KIS_COLORSPACE_CMYK_F32_H_ #define KIS_COLORSPACE_CMYK_F32_H_ #include #include "KoColorModelStandardIds.h" struct KoCmykF32Traits; #define TYPE_CMYKA_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_CMYK)|EXTRA_SH(1)|CHANNELS_SH(4)|BYTES_SH(4)) class CmykF32ColorSpace : public LcmsColorSpace { public: CmykF32ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence independence) const; virtual KoID colorModelId() const { return CMYKAColorModelID; } virtual KoID colorDepthId() const { return Float32BitsColorDepthID; } virtual KoColorSpace *clone() const; virtual void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const; virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY( qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; static QString colorSpaceId() { return "CMYKAF32"; } virtual bool hasHighDynamicRange() const { return true; } }; class CmykF32ColorSpaceFactory : public LcmsColorSpaceFactory { public: CmykF32ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_CMYKA_FLT, cmsSigCmykData) { } virtual bool userVisible() const { return true; } virtual QString id() const { return CmykF32ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("CMYK (32 bits floating/channel)"); + return QString("%1 (%2)").arg(CMYKAColorModelID.name()).arg(Float32BitsColorDepthID.name()); } virtual KoID colorModelId() const { return CMYKAColorModelID; } virtual KoID colorDepthId() const { return Float32BitsColorDepthID; } virtual int referenceDepth() const { return 32; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new CmykF32ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return "Chemical proof"; } virtual bool isHdr() const { return true; } }; #endif diff --git a/plugins/color/lcms2engine/colorspaces/cmyk_u16/CmykU16ColorSpace.h b/plugins/color/lcms2engine/colorspaces/cmyk_u16/CmykU16ColorSpace.h index 3af4c1d524..215fd6b86f 100644 --- a/plugins/color/lcms2engine/colorspaces/cmyk_u16/CmykU16ColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/cmyk_u16/CmykU16ColorSpace.h @@ -1,116 +1,116 @@ /* * Copyright (c) 2006 Cyrille Berger * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KIS_STRATEGY_COLORSPACE_CMYK_U16_H_ #define KIS_STRATEGY_COLORSPACE_CMYK_U16_H_ #include #include #include "KoColorModelStandardIds.h" typedef KoCmykTraits CmykU16Traits; #define TYPE_CMYKA_16 (COLORSPACE_SH(PT_CMYK)|EXTRA_SH(1)|CHANNELS_SH(4)|BYTES_SH(2)) class CmykU16ColorSpace : public LcmsColorSpace { public: CmykU16ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence independence) const; virtual KoID colorModelId() const { return CMYKAColorModelID; } virtual KoID colorDepthId() const { return Integer16BitsColorDepthID; } virtual KoColorSpace *clone() const; virtual void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const; virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY(qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; static QString colorSpaceId() { return "CMYKAU16"; } }; class CmykU16ColorSpaceFactory : public LcmsColorSpaceFactory { public: CmykU16ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_CMYKA_16, cmsSigCmykData) { } virtual bool userVisible() const { return true; } virtual QString id() const { return CmykU16ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("CMYK (16-bit integer/channel)"); + return QString("%1 (%2)").arg(CMYKAColorModelID.name()).arg(Integer16BitsColorDepthID.name()); } virtual KoID colorModelId() const { return CMYKAColorModelID; } virtual KoID colorDepthId() const { return Integer16BitsColorDepthID; } virtual int referenceDepth() const { return 16; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new CmykU16ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return "Chemical proof"; } }; #endif diff --git a/plugins/color/lcms2engine/colorspaces/cmyk_u8/CmykU8ColorSpace.h b/plugins/color/lcms2engine/colorspaces/cmyk_u8/CmykU8ColorSpace.h index d70e09528b..0e39156df3 100644 --- a/plugins/color/lcms2engine/colorspaces/cmyk_u8/CmykU8ColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/cmyk_u8/CmykU8ColorSpace.h @@ -1,114 +1,114 @@ /* * Copyright (c) 2006 Cyrille Berger * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KIS_STRATEGY_COLORSPACE_CMYK_U8_H_ #define KIS_STRATEGY_COLORSPACE_CMYK_U8_H_ #include #include #include "KoColorModelStandardIds.h" typedef KoCmykTraits CmykU8Traits; class CmykU8ColorSpace : public LcmsColorSpace { public: CmykU8ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence independence) const; virtual KoID colorModelId() const { return CMYKAColorModelID; } virtual KoID colorDepthId() const { return Integer8BitsColorDepthID; } virtual KoColorSpace *clone() const; virtual void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const; virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY(qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; static QString colorSpaceId() { return "CMYK"; } }; class CmykU8ColorSpaceFactory : public LcmsColorSpaceFactory { public: CmykU8ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_CMYK5_8, cmsSigCmykData) { } virtual bool userVisible() const { return true; } virtual QString id() const { return CmykU8ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("CMYK (8-bit integer/channel)"); + return QString("%1 (%2)").arg(CMYKAColorModelID.name()).arg(Integer8BitsColorDepthID.name()); } virtual KoID colorModelId() const { return CMYKAColorModelID; } virtual KoID colorDepthId() const { return Integer8BitsColorDepthID; } virtual int referenceDepth() const { return 8; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new CmykU8ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return "Chemical proof"; } }; #endif diff --git a/plugins/color/lcms2engine/colorspaces/gray_f16/GrayF16ColorSpace.h b/plugins/color/lcms2engine/colorspaces/gray_f16/GrayF16ColorSpace.h index e99cf7afc2..65bd44af4f 100644 --- a/plugins/color/lcms2engine/colorspaces/gray_f16/GrayF16ColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/gray_f16/GrayF16ColorSpace.h @@ -1,125 +1,125 @@ /* * Copyright (c) 2004-2006 Cyrille Berger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef COLORSPACE_GRAYSCALE_F16_H_ #define COLORSPACE_GRAYSCALE_F16_H_ #include #include #include "LcmsColorSpace.h" #define TYPE_GRAYA_HALF_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(2)) struct KoGrayF16Traits; class GrayF16ColorSpace : public LcmsColorSpace { public: GrayF16ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence) const { return false; } virtual KoID colorModelId() const { return GrayAColorModelID; } virtual KoID colorDepthId() const { return Float16BitsColorDepthID; } virtual KoColorSpace *clone() const; virtual void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const; virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY(qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; static QString colorSpaceId() { return "GRAYAF16"; } virtual bool hasHighDynamicRange() const { return true; } }; class GrayF16ColorSpaceFactory : public LcmsColorSpaceFactory { public: GrayF16ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_GRAYA_HALF_FLT, cmsSigGrayData) { } virtual QString id() const { return GrayF16ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("Grayscale/Alpha (16-bit float/channel)"); + return QString("%1 (%2)").arg(GrayAColorModelID.name()).arg(Float16BitsColorDepthID.name()); } virtual KoID colorModelId() const { return GrayAColorModelID; } virtual KoID colorDepthId() const { return Float16BitsColorDepthID; } virtual int referenceDepth() const { return 16; } virtual bool userVisible() const { return true; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new GrayF16ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return "gray built-in"; } virtual bool isHdr() const { return true; } }; #endif // KIS_STRATEGY_COLORSPACE_GRAYSCALE_H_ diff --git a/plugins/color/lcms2engine/colorspaces/gray_f32/GrayF32ColorSpace.h b/plugins/color/lcms2engine/colorspaces/gray_f32/GrayF32ColorSpace.h index f5c07f2f8d..0fcfcc82d3 100644 --- a/plugins/color/lcms2engine/colorspaces/gray_f32/GrayF32ColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/gray_f32/GrayF32ColorSpace.h @@ -1,125 +1,125 @@ /* * Copyright (c) 2004-2006 Cyrille Berger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef COLORSPACE_GRAYSCALE_F32_H_ #define COLORSPACE_GRAYSCALE_F32_H_ #include #include #include "LcmsColorSpace.h" #define TYPE_GRAYA_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(4)) struct KoGrayF32Traits; class GrayF32ColorSpace : public LcmsColorSpace { public: GrayF32ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence) const { return false; } virtual KoID colorModelId() const { return GrayAColorModelID; } virtual KoID colorDepthId() const { return Float32BitsColorDepthID; } virtual KoColorSpace *clone() const; virtual void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const; virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY(qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; static QString colorSpaceId() { return "GRAYAF32"; } virtual bool hasHighDynamicRange() const { return true; } }; class GrayF32ColorSpaceFactory : public LcmsColorSpaceFactory { public: GrayF32ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_GRAYA_FLT, cmsSigGrayData) { } virtual QString id() const { return GrayF32ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("Grayscale/Alpha (32-bit float/channel)"); + return QString("%1 (%2)").arg(GrayAColorModelID.name()).arg(Float32BitsColorDepthID.name()); } virtual KoID colorModelId() const { return GrayAColorModelID; } virtual KoID colorDepthId() const { return Float32BitsColorDepthID; } virtual int referenceDepth() const { return 32; } virtual bool userVisible() const { return true; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new GrayF32ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return "gray built-in"; } virtual bool isHdr() const { return true; } }; #endif // KIS_STRATEGY_COLORSPACE_GRAYSCALE_H_ diff --git a/plugins/color/lcms2engine/colorspaces/gray_u16/GrayU16ColorSpace.h b/plugins/color/lcms2engine/colorspaces/gray_u16/GrayU16ColorSpace.h index cbe71f5837..ba84fd0d9a 100644 --- a/plugins/color/lcms2engine/colorspaces/gray_u16/GrayU16ColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/gray_u16/GrayU16ColorSpace.h @@ -1,114 +1,114 @@ /* * Copyright (c) 2004-2006 Cyrille Berger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIS_COLORSPACE_GRAYSCALE_U16_H_ #define KIS_COLORSPACE_GRAYSCALE_U16_H_ #include #include "LcmsColorSpace.h" #include #include "KoColorModelStandardIds.h" typedef KoColorSpaceTrait GrayAU16Traits; class GrayAU16ColorSpace : public LcmsColorSpace { public: GrayAU16ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence) const { return false; } virtual KoID colorModelId() const { return GrayAColorModelID; } virtual KoID colorDepthId() const { return Integer16BitsColorDepthID; } virtual KoColorSpace *clone() const; virtual void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const; virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY(qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; static QString colorSpaceId() { return "GRAYAU16"; } }; class GrayAU16ColorSpaceFactory : public LcmsColorSpaceFactory { public: GrayAU16ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_GRAYA_16, cmsSigGrayData) { } virtual QString id() const { return GrayAU16ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("Grayscale (16-bit integer/channel)"); + return QString("%1 (%2)").arg(GrayAColorModelID.name()).arg(Integer16BitsColorDepthID.name()); } virtual KoID colorModelId() const { return GrayAColorModelID; } virtual KoID colorDepthId() const { return Integer16BitsColorDepthID; } virtual int referenceDepth() const { return 16; } virtual bool userVisible() const { return true; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new GrayAU16ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return "gray built-in"; } }; #endif // KIS_STRATEGY_COLORSPACE_GRAYSCALE_H_ diff --git a/plugins/color/lcms2engine/colorspaces/gray_u8/GrayU8ColorSpace.h b/plugins/color/lcms2engine/colorspaces/gray_u8/GrayU8ColorSpace.h index 40b245b10b..aa2416ee03 100644 --- a/plugins/color/lcms2engine/colorspaces/gray_u8/GrayU8ColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/gray_u8/GrayU8ColorSpace.h @@ -1,116 +1,116 @@ /* * Copyright (c) 2004-2006 Cyrille Berger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIS_GRAY_COLORSPACE_H_ #define KIS_GRAY_COLORSPACE_H_ #include #include #include #include "KoColorModelStandardIds.h" typedef KoColorSpaceTrait GrayAU8Traits; class GrayAU8ColorSpace : public LcmsColorSpace { public: GrayAU8ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence) const { return false; } virtual KoID colorModelId() const { return GrayAColorModelID; } virtual KoID colorDepthId() const { return Integer8BitsColorDepthID; } virtual KoColorSpace *clone() const; virtual void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const; virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY(qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; static QString colorSpaceId() { return "GRAYA"; } }; class GrayAU8ColorSpaceFactory : public LcmsColorSpaceFactory { public: GrayAU8ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_GRAYA_8, cmsSigGrayData) { } virtual QString id() const { return GrayAU8ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("Grayscale (8-bit integer/channel)"); + return QString("%1 (%2)").arg(GrayAColorModelID.name()).arg(Integer8BitsColorDepthID.name()); } virtual KoID colorModelId() const { return GrayAColorModelID; } virtual KoID colorDepthId() const { return Integer8BitsColorDepthID; } virtual int referenceDepth() const { return 8; } virtual bool userVisible() const { return true; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new GrayAU8ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return "gray built-in"; } }; #endif // KIS_STRATEGY_COLORSPACE_GRAYSCALE_H_ diff --git a/plugins/color/lcms2engine/colorspaces/lab_f32/LabF32ColorSpace.h b/plugins/color/lcms2engine/colorspaces/lab_f32/LabF32ColorSpace.h index 9315c370ce..1b427e6b9c 100644 --- a/plugins/color/lcms2engine/colorspaces/lab_f32/LabF32ColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/lab_f32/LabF32ColorSpace.h @@ -1,122 +1,122 @@ /* * Copyright (c) 2006 Cyrille Berger * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef LabF32ColorSpace_H_ #define LabF32ColorSpace_H_ #include "LcmsColorSpace.h" #include "KoColorModelStandardIds.h" // XXX: implement normalizedChannelValues? struct KoLabF32Traits; class LabF32ColorSpace : public LcmsColorSpace { public: LabF32ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence independence) const; static QString colorSpaceId() { return QString("LABAF32"); } virtual KoID colorModelId() const { return LABAColorModelID; } virtual KoID colorDepthId() const { return Float32BitsColorDepthID; } virtual KoColorSpace *clone() const; virtual void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const; virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY(qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; virtual bool hasHighDynamicRange() const { return true; } }; class LabF32ColorSpaceFactory : public LcmsColorSpaceFactory { public: LabF32ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_LabA_FLT, cmsSigLabData) { } virtual bool userVisible() const { return true; } virtual QString id() const { return LabF32ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("L*a*b* (32-bit float/channel)"); + return QString("%1 (%2)").arg(LABAColorModelID.name()).arg(Float32BitsColorDepthID.name()); } virtual KoID colorModelId() const { return LABAColorModelID; } virtual KoID colorDepthId() const { return Float32BitsColorDepthID; } virtual int referenceDepth() const { return 32; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new LabF32ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return "Lab identity built-in"; } virtual bool isHdr() const { return true; } }; #endif diff --git a/plugins/color/lcms2engine/colorspaces/lab_u16/LabColorSpace.h b/plugins/color/lcms2engine/colorspaces/lab_u16/LabColorSpace.h index 3e4b297032..1005fbd61e 100644 --- a/plugins/color/lcms2engine/colorspaces/lab_u16/LabColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/lab_u16/LabColorSpace.h @@ -1,120 +1,120 @@ /* * Copyright (c) 2006 Cyrille Berger * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef LabU16ColorSpace_H_ #define LabU16ColorSpace_H_ #include "LcmsColorSpace.h" #include "KoColorModelStandardIds.h" #define TYPE_LABA_16 (COLORSPACE_SH(PT_Lab) | CHANNELS_SH(3) | BYTES_SH(2) | EXTRA_SH(1)) struct KoLabF32Traits; class LabU16ColorSpace : public LcmsColorSpace { public: LabU16ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence independence) const; virtual QString normalisedChannelValueText(const quint8 *pixel, quint32 channelIndex) const; static QString colorSpaceId() { return QString("LABA"); } virtual KoID colorModelId() const { return LABAColorModelID; } virtual KoID colorDepthId() const { return Integer16BitsColorDepthID; } virtual KoColorSpace *clone() const; virtual void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const; virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY(qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; private: static const quint32 MAX_CHANNEL_L = 0xff00; static const quint32 MAX_CHANNEL_AB = 0xffff; static const quint32 CHANNEL_AB_ZERO_OFFSET = 0x8000; }; class LabU16ColorSpaceFactory : public LcmsColorSpaceFactory { public: LabU16ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_LABA_16, cmsSigLabData) { } virtual bool userVisible() const { return true; } virtual QString id() const { return LabU16ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("L*a*b* (16-bit integer/channel)"); + return QString("%1 (%2)").arg(LABAColorModelID.name()).arg(Integer16BitsColorDepthID.name()); } virtual KoID colorModelId() const { return LABAColorModelID; } virtual KoID colorDepthId() const { return Integer16BitsColorDepthID; } virtual int referenceDepth() const { return 16; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new LabU16ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return "Lab identity built-in"; } }; #endif diff --git a/plugins/color/lcms2engine/colorspaces/lab_u8/LabU8ColorSpace.h b/plugins/color/lcms2engine/colorspaces/lab_u8/LabU8ColorSpace.h index 7545823ee3..cbbd131f48 100644 --- a/plugins/color/lcms2engine/colorspaces/lab_u8/LabU8ColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/lab_u8/LabU8ColorSpace.h @@ -1,112 +1,112 @@ /* * Copyright (c) 2006 Cyrille Berger * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef LabU8ColorSpace_H_ #define LabU8ColorSpace_H_ #include "LcmsColorSpace.h" #include "KoColorModelStandardIds.h" #define TYPE_LABA_8 (COLORSPACE_SH(PT_Lab) | CHANNELS_SH(3) | BYTES_SH(1) | EXTRA_SH(1)) struct KoLabU8Traits; class LabU8ColorSpace : public LcmsColorSpace { public: LabU8ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence independence) const; virtual QString normalisedChannelValueText(const quint8 *pixel, quint32 channelIndex) const; static QString colorSpaceId() { return QString("LABAU8"); } virtual KoID colorModelId() const { return LABAColorModelID; } virtual KoID colorDepthId() const { return Integer8BitsColorDepthID; } virtual KoColorSpace* clone() const; virtual void colorToXML(const quint8* pixel, QDomDocument& doc, QDomElement& colorElt) const; virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY(qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; private: static const quint32 MAX_CHANNEL_L = 100; static const quint32 MAX_CHANNEL_AB = 255; static const quint32 CHANNEL_AB_ZERO_OFFSET = 128; }; class LabU8ColorSpaceFactory : public LcmsColorSpaceFactory { public: LabU8ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_LABA_8, cmsSigLabData) {} virtual bool userVisible() const { return true; } virtual QString id() const { return LabU8ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("L*a*b* (8-bit integer/channel)"); + return QString("%1 (%2)").arg(LABAColorModelID.name()).arg(Integer8BitsColorDepthID.name()); } virtual KoID colorModelId() const { return LABAColorModelID; } virtual KoID colorDepthId() const { return Integer8BitsColorDepthID; } virtual int referenceDepth() const { return 8; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new LabU8ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return "Lab identity built-in"; } }; #endif diff --git a/plugins/color/lcms2engine/colorspaces/rgb_f16/RgbF16ColorSpace.h b/plugins/color/lcms2engine/colorspaces/rgb_f16/RgbF16ColorSpace.h index c202988a58..a75cd9a4e8 100644 --- a/plugins/color/lcms2engine/colorspaces/rgb_f16/RgbF16ColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/rgb_f16/RgbF16ColorSpace.h @@ -1,121 +1,121 @@ /* * Copyright (c) 2006 Cyrille Berger * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KORGBF16COLORSPACE_H_ #define KORGBF16COLORSPACE_H_ #include "LcmsColorSpace.h" #include "KoColorModelStandardIds.h" struct KoRgbF16Traits; class RgbF16ColorSpace : public LcmsColorSpace { public: RgbF16ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence independence) const; virtual KoID colorModelId() const { return RGBAColorModelID; } virtual KoID colorDepthId() const { return Float16BitsColorDepthID; } virtual KoColorSpace *clone() const; virtual void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const; virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY(qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; static QString colorSpaceId() { return QString("RGBAF16"); } virtual bool hasHighDynamicRange() const { return true; } }; class RgbF16ColorSpaceFactory : public LcmsColorSpaceFactory { public: RgbF16ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_RGBA_HALF_FLT, cmsSigRgbData) { } virtual QString id() const { return RgbF16ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("RGBA (16-bit floating/channel)"); + return QString("%1 (%2)").arg(RGBAColorModelID.name()).arg(Float16BitsColorDepthID.name()); } virtual bool userVisible() const { return true; } virtual KoID colorModelId() const { return RGBAColorModelID; } virtual KoID colorDepthId() const { return Float16BitsColorDepthID; } virtual int referenceDepth() const { return 16; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new RgbF16ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return "sRGB-elle-V2-g10.icc"; } virtual bool isHdr() const { return true; } }; #endif diff --git a/plugins/color/lcms2engine/colorspaces/rgb_f32/RgbF32ColorSpace.h b/plugins/color/lcms2engine/colorspaces/rgb_f32/RgbF32ColorSpace.h index 78d93d6c00..e5f2dbe2f7 100644 --- a/plugins/color/lcms2engine/colorspaces/rgb_f32/RgbF32ColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/rgb_f32/RgbF32ColorSpace.h @@ -1,121 +1,121 @@ /* * Copyright (c) 2006 Cyrille Berger * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KORGBF32COLORSPACE_H_ #define KORGBF32COLORSPACE_H_ #include "LcmsColorSpace.h" #include "KoColorModelStandardIds.h" struct KoRgbF32Traits; class RgbF32ColorSpace : public LcmsColorSpace { public: RgbF32ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence independence) const; virtual KoID colorModelId() const { return RGBAColorModelID; } virtual KoID colorDepthId() const { return Float32BitsColorDepthID; } virtual KoColorSpace *clone() const; virtual void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const; virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY(qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; static QString colorSpaceId() { return QString("RGBAF32"); } virtual bool hasHighDynamicRange() const { return true; } }; class RgbF32ColorSpaceFactory : public LcmsColorSpaceFactory { public: RgbF32ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_RGBA_FLT, cmsSigRgbData) { } virtual QString id() const { return RgbF32ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("RGBA (32-bit floating/channel)"); + return QString("%1 (%2)").arg(RGBAColorModelID.name()).arg(Float32BitsColorDepthID.name()); } virtual bool userVisible() const { return true; } virtual KoID colorModelId() const { return RGBAColorModelID; } virtual KoID colorDepthId() const { return Float32BitsColorDepthID; } virtual int referenceDepth() const { return 32; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new RgbF32ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return "sRGB-elle-V2-g10.icc"; } virtual bool isHdr() const { return true; } }; #endif diff --git a/plugins/color/lcms2engine/colorspaces/rgb_u16/RgbU16ColorSpace.h b/plugins/color/lcms2engine/colorspaces/rgb_u16/RgbU16ColorSpace.h index 7b77312c71..058518d306 100644 --- a/plugins/color/lcms2engine/colorspaces/rgb_u16/RgbU16ColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/rgb_u16/RgbU16ColorSpace.h @@ -1,105 +1,105 @@ /* * Copyright (c) 2006 Cyrille Berger * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KORGBU16COLORSPACE_H_ #define KORGBU16COLORSPACE_H_ #include "LcmsColorSpace.h" #include "KoColorModelStandardIds.h" struct KoBgrU16Traits; class RgbU16ColorSpace : public LcmsColorSpace { public: RgbU16ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence independence) const; virtual KoID colorModelId() const { return RGBAColorModelID; } virtual KoID colorDepthId() const { return Integer16BitsColorDepthID; } virtual KoColorSpace *clone() const; virtual void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const; virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY(qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; static QString colorSpaceId() { return QString("RGBA16"); } }; class RgbU16ColorSpaceFactory : public LcmsColorSpaceFactory { public: RgbU16ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_BGRA_16, cmsSigRgbData) { } virtual QString id() const { return RgbU16ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("RGB (16-bit integer/channel)"); + return QString("%1 (%2)").arg(RGBAColorModelID.name()).arg(Integer16BitsColorDepthID.name()); } virtual bool userVisible() const { return true; } virtual KoID colorModelId() const { return RGBAColorModelID; } virtual KoID colorDepthId() const { return Integer16BitsColorDepthID; } virtual int referenceDepth() const { return 16; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new RgbU16ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return "sRGB-elle-V2-g10.icc";//this is a linear space, because 16bit is enough to only enjoy advantages of linear space } }; #endif diff --git a/plugins/color/lcms2engine/colorspaces/rgb_u8/RgbU8ColorSpace.h b/plugins/color/lcms2engine/colorspaces/rgb_u8/RgbU8ColorSpace.h index 767fd713d0..208cf70bd4 100644 --- a/plugins/color/lcms2engine/colorspaces/rgb_u8/RgbU8ColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/rgb_u8/RgbU8ColorSpace.h @@ -1,118 +1,118 @@ /* * Copyright (c) 2002 Patrick Julien * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KO_STRATEGY_COLORSPACE_RGB_H_ #define KO_STRATEGY_COLORSPACE_RGB_H_ #include #include #include "KoColorModelStandardIds.h" struct KoBgrU8Traits; class RgbU8ColorSpace : public LcmsColorSpace { public: RgbU8ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence) const { return false; } virtual KoColorTransformation *createInvertTransformation() const; virtual KoID colorModelId() const { return RGBAColorModelID; } virtual KoID colorDepthId() const { return Integer8BitsColorDepthID; } virtual KoColorSpace *clone() const; virtual void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const; virtual void colorFromXML(quint8 *pixel, const QDomElement &elt) const; virtual quint8 intensity8(const quint8 * src) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY(qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; static QString colorSpaceId() { return QString("RGBA"); } }; class RgbU8ColorSpaceFactory : public LcmsColorSpaceFactory { public: RgbU8ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_BGRA_8, cmsSigRgbData) {} virtual bool userVisible() const { return true; } virtual QString id() const { return RgbU8ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("RGB (8-bit integer/channel)"); + return QString("%1 (%2)").arg(RGBAColorModelID.name()).arg(Integer8BitsColorDepthID.name()); } virtual KoID colorModelId() const { return RGBAColorModelID; } virtual KoID colorDepthId() const { return Integer8BitsColorDepthID; } virtual int referenceDepth() const { return 8; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new RgbU8ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return "sRGB-elle-V2-srgbtrc.icc"; } }; #endif // KO_STRATEGY_COLORSPACE_RGB_H_ diff --git a/plugins/color/lcms2engine/colorspaces/xyz_f16/XyzF16ColorSpace.h b/plugins/color/lcms2engine/colorspaces/xyz_f16/XyzF16ColorSpace.h index c4ce5fc3bd..f52a319184 100644 --- a/plugins/color/lcms2engine/colorspaces/xyz_f16/XyzF16ColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/xyz_f16/XyzF16ColorSpace.h @@ -1,125 +1,125 @@ /* * Copyright (c) 2007 Cyrille Berger (cberger@cberger.net) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KIS_XYZ_F16_COLORSPACE_H_ #define KIS_XYZ_F16_COLORSPACE_H_ #include #define TYPE_XYZA_HALF_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_XYZ)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)) #include struct KoXyzF16Traits; class XyzF16ColorSpace : public LcmsColorSpace { public: XyzF16ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence independence) const; virtual KoID colorModelId() const { return XYZAColorModelID; } virtual KoID colorDepthId() const { return Float16BitsColorDepthID; } virtual KoColorSpace *clone() const; virtual void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const; virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY(qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; static QString colorSpaceId() { return QString("XYZAF16"); } virtual bool hasHighDynamicRange() const { return true; } }; class XyzF16ColorSpaceFactory : public LcmsColorSpaceFactory { public: XyzF16ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_XYZA_HALF_FLT, cmsSigXYZData) { } virtual QString id() const { return XyzF16ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("XYZ (32-bit float/channel)"); + return QString("%1 (%2)").arg(XYZAColorModelID.name()).arg(Float16BitsColorDepthID.name()); } virtual bool userVisible() const { return true; } virtual KoID colorModelId() const { return XYZAColorModelID; } virtual KoID colorDepthId() const { return Float16BitsColorDepthID; } virtual int referenceDepth() const { return 16; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new XyzF16ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return "XYZ identity built-in"; } virtual bool isHdr() const { return true; } }; #endif diff --git a/plugins/color/lcms2engine/colorspaces/xyz_f32/XyzF32ColorSpace.h b/plugins/color/lcms2engine/colorspaces/xyz_f32/XyzF32ColorSpace.h index 72c96a889b..1119f9a592 100644 --- a/plugins/color/lcms2engine/colorspaces/xyz_f32/XyzF32ColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/xyz_f32/XyzF32ColorSpace.h @@ -1,125 +1,125 @@ /* * Copyright (c) 2007 Cyrille Berger (cberger@cberger.net) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KIS_XYZ_F32_COLORSPACE_H_ #define KIS_XYZ_F32_COLORSPACE_H_ #include #define TYPE_XYZA_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_XYZ)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4)) #include struct KoXyzF32Traits; class XyzF32ColorSpace : public LcmsColorSpace { public: XyzF32ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence independence) const; virtual KoID colorModelId() const { return XYZAColorModelID; } virtual KoID colorDepthId() const { return Float32BitsColorDepthID; } virtual KoColorSpace *clone() const; virtual void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const; virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY(qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; static QString colorSpaceId() { return QString("XYZAF32"); } virtual bool hasHighDynamicRange() const { return true; } }; class XyzF32ColorSpaceFactory : public LcmsColorSpaceFactory { public: XyzF32ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_XYZA_FLT, cmsSigXYZData) { } virtual QString id() const { return XyzF32ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("XYZ (32-bit float/channel)"); + return QString("%1 (%2)").arg(XYZAColorModelID.name()).arg(Float32BitsColorDepthID.name()); } virtual bool userVisible() const { return true; } virtual KoID colorModelId() const { return XYZAColorModelID; } virtual KoID colorDepthId() const { return Float32BitsColorDepthID; } virtual int referenceDepth() const { return 32; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new XyzF32ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return "XYZ identity built-in"; } virtual bool isHdr() const { return true; } }; #endif diff --git a/plugins/color/lcms2engine/colorspaces/xyz_u16/XyzU16ColorSpace.h b/plugins/color/lcms2engine/colorspaces/xyz_u16/XyzU16ColorSpace.h index 7d53b906a8..6bee624555 100644 --- a/plugins/color/lcms2engine/colorspaces/xyz_u16/XyzU16ColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/xyz_u16/XyzU16ColorSpace.h @@ -1,107 +1,107 @@ /* * Copyright (c) 2007 Cyrille Berger (cberger@cberger.net) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KIS_XYZ_U16_COLORSPACE_H_ #define KIS_XYZ_U16_COLORSPACE_H_ #include #include #include #define TYPE_XYZA_16 (COLORSPACE_SH(PT_XYZ)|CHANNELS_SH(3)|BYTES_SH(2)|EXTRA_SH(1)) class XyzU16ColorSpace : public LcmsColorSpace { public: XyzU16ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence independence) const; virtual KoID colorModelId() const { return XYZAColorModelID; } virtual KoID colorDepthId() const { return Integer16BitsColorDepthID; } virtual KoColorSpace *clone() const; virtual void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const; virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY(qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; static QString colorSpaceId() { return QString("XYZA16"); } }; class XyzU16ColorSpaceFactory : public LcmsColorSpaceFactory { public: XyzU16ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_XYZA_16, cmsSigXYZData) { } virtual QString id() const { return XyzU16ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("XYZ (16-bit integer/channel)"); + return QString("%1 (%2)").arg(XYZAColorModelID.name()).arg(Integer16BitsColorDepthID.name()); } virtual bool userVisible() const { return true; } virtual KoID colorModelId() const { return XYZAColorModelID; } virtual KoID colorDepthId() const { return Integer16BitsColorDepthID; } virtual int referenceDepth() const { return 16; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new XyzU16ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return "XYZ identity built-in"; } }; #endif diff --git a/plugins/color/lcms2engine/colorspaces/xyz_u8/XyzU8ColorSpace.h b/plugins/color/lcms2engine/colorspaces/xyz_u8/XyzU8ColorSpace.h index a44046124c..51883900c0 100644 --- a/plugins/color/lcms2engine/colorspaces/xyz_u8/XyzU8ColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/xyz_u8/XyzU8ColorSpace.h @@ -1,115 +1,115 @@ /* * Copyright (c) 2007 Cyrille Berger (cberger@cberger.net) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KIS_XYZ_U8_COLORSPACE_H_ #define KIS_XYZ_U8_COLORSPACE_H_ #include #include #define TYPE_XYZA_8 (COLORSPACE_SH(PT_XYZ)|CHANNELS_SH(3)|BYTES_SH(1)|EXTRA_SH(1)) struct KoXyzU8Traits; class XyzU8ColorSpace : public LcmsColorSpace { public: XyzU8ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence independence) const; static QString colorSpaceId() { return QString("XYZA8"); } virtual KoID colorModelId() const { return XYZAColorModelID; } virtual KoID colorDepthId() const { return Integer8BitsColorDepthID; } virtual KoColorSpace *clone() const; virtual void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const; virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY(qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; }; class XyzU8ColorSpaceFactory : public LcmsColorSpaceFactory { public: XyzU8ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_XYZA_8, cmsSigXYZData) { } virtual QString id() const { return XyzU8ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("XYZ (8-bit integer/channel)"); + return QString("%1 (%2)").arg(XYZAColorModelID.name()).arg(Integer8BitsColorDepthID.name()); } virtual bool userVisible() const { return true; } virtual KoID colorModelId() const { return XYZAColorModelID; } virtual KoID colorDepthId() const { return Integer8BitsColorDepthID; } virtual int referenceDepth() const { return 8; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new XyzU8ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return "XYZ identity built-in"; } }; #endif diff --git a/plugins/color/lcms2engine/colorspaces/ycbcr_f32/YCbCrF32ColorSpace.h b/plugins/color/lcms2engine/colorspaces/ycbcr_f32/YCbCrF32ColorSpace.h index ffb5dcf910..e8ca2f8ba3 100644 --- a/plugins/color/lcms2engine/colorspaces/ycbcr_f32/YCbCrF32ColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/ycbcr_f32/YCbCrF32ColorSpace.h @@ -1,126 +1,126 @@ /* * Copyright (c) 2007 Cyrille Berger (cberger@cberger.net) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KIS_YCBCR_F32_COLORSPACE_H_ #define KIS_YCBCR_F32_COLORSPACE_H_ #include #include #define TYPE_YCbCrA_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_YCbCr)|CHANNELS_SH(3)|EXTRA_SH(1)|BYTES_SH(4)) struct KoYCbCrF32Traits; class YCbCrF32ColorSpace : public LcmsColorSpace { public: YCbCrF32ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence independence) const; static QString colorSpaceId() { return QString("YCBCRF32"); } virtual KoID colorModelId() const { return YCbCrAColorModelID; } virtual KoID colorDepthId() const { return Float32BitsColorDepthID; } virtual bool hasHighDynamicRange() const { return true; } virtual KoColorSpace *clone() const; virtual void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const; virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY(qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; }; class YCbCrF32ColorSpaceFactory : public LcmsColorSpaceFactory { public: YCbCrF32ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_YCbCrA_FLT, cmsSigYCbCrData) { } virtual QString id() const { return YCbCrF32ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("YCBCR (32-bit float/channel)"); + return QString("%1 (%2)").arg(YCbCrAColorModelID.name()).arg(Float32BitsColorDepthID.name()); } virtual bool userVisible() const { return true; } virtual KoID colorModelId() const { return YCbCrAColorModelID; } virtual KoID colorDepthId() const { return Float32BitsColorDepthID; } virtual int referenceDepth() const { return 32; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new YCbCrF32ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return QString(); } virtual bool isHdr() const { return true; } }; #endif diff --git a/plugins/color/lcms2engine/colorspaces/ycbcr_u16/YCbCrU16ColorSpace.h b/plugins/color/lcms2engine/colorspaces/ycbcr_u16/YCbCrU16ColorSpace.h index a6e941e96e..349a8b2167 100644 --- a/plugins/color/lcms2engine/colorspaces/ycbcr_u16/YCbCrU16ColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/ycbcr_u16/YCbCrU16ColorSpace.h @@ -1,115 +1,115 @@ /* * Copyright (c) 2007 Cyrille Berger (cberger@cberger.net) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KIS_YCBCR_U16_COLORSPACE_H_ #define KIS_YCBCR_U16_COLORSPACE_H_ #include #include #define TYPE_YCbCrA_16 (COLORSPACE_SH(PT_YCbCr)|CHANNELS_SH(3)|BYTES_SH(2)|EXTRA_SH(1)) struct KoYCbCrU16Traits; class YCbCrU16ColorSpace : public LcmsColorSpace { public: YCbCrU16ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence independence) const; static QString colorSpaceId() { return QString("YCBCRAU16"); } virtual KoID colorModelId() const { return YCbCrAColorModelID; } virtual KoID colorDepthId() const { return Integer16BitsColorDepthID; } virtual KoColorSpace *clone() const; virtual void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const; virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY(qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; }; class YCbCrU16ColorSpaceFactory : public LcmsColorSpaceFactory { public: YCbCrU16ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_YCbCrA_16, cmsSigYCbCrData) { } virtual QString id() const { return YCbCrU16ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("YCBCR (16-bit integer/channel)"); + return QString("%1 (%2)").arg(YCbCrAColorModelID.name()).arg(Integer16BitsColorDepthID.name()); } virtual bool userVisible() const { return true; } virtual KoID colorModelId() const { return YCbCrAColorModelID; } virtual KoID colorDepthId() const { return Integer16BitsColorDepthID; } virtual int referenceDepth() const { return 16; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new YCbCrU16ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return QString(); } }; #endif diff --git a/plugins/color/lcms2engine/colorspaces/ycbcr_u8/YCbCrU8ColorSpace.h b/plugins/color/lcms2engine/colorspaces/ycbcr_u8/YCbCrU8ColorSpace.h index db0648ed0f..0610c2ccc4 100644 --- a/plugins/color/lcms2engine/colorspaces/ycbcr_u8/YCbCrU8ColorSpace.h +++ b/plugins/color/lcms2engine/colorspaces/ycbcr_u8/YCbCrU8ColorSpace.h @@ -1,115 +1,115 @@ /* * Copyright (c) 2007 Cyrille Berger (cberger@cberger.net) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KIS_YCBCR_U8_COLORSPACE_H_ #define KIS_YCBCR_U8_COLORSPACE_H_ #include #include #define TYPE_YCbCrA_8 (COLORSPACE_SH(PT_YCbCr)|CHANNELS_SH(3)|BYTES_SH(1)|EXTRA_SH(1)) struct KoYCbCrU8Traits; class YCbCrU8ColorSpace : public LcmsColorSpace { public: YCbCrU8ColorSpace(const QString &name, KoColorProfile *p); virtual bool willDegrade(ColorSpaceIndependence independence) const; static QString colorSpaceId() { return QString("YCBCRA8"); } virtual KoID colorModelId() const { return YCbCrAColorModelID; } virtual KoID colorDepthId() const { return Integer8BitsColorDepthID; } virtual KoColorSpace *clone() const; virtual void colorToXML(const quint8 *pixel, QDomDocument &doc, QDomElement &colorElt) const; virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const; virtual void toHSY(const QVector &channelValues, qreal *hue, qreal *sat, qreal *luma) const; virtual QVector fromHSY(qreal *hue, qreal *sat, qreal *luma) const; virtual void toYUV(const QVector &channelValues, qreal *y, qreal *u, qreal *v) const; virtual QVector fromYUV(qreal *y, qreal *u, qreal *v) const; }; class YCbCrU8ColorSpaceFactory : public LcmsColorSpaceFactory { public: YCbCrU8ColorSpaceFactory() : LcmsColorSpaceFactory(TYPE_YCbCrA_8, cmsSigYCbCrData) { } virtual QString id() const { return YCbCrU8ColorSpace::colorSpaceId(); } virtual QString name() const { - return i18n("YCBCR (8-bit integer/channel)"); + return QString("%1 (%2)").arg(YCbCrAColorModelID.name()).arg(Integer8BitsColorDepthID.name()); } virtual bool userVisible() const { return true; } virtual KoID colorModelId() const { return YCbCrAColorModelID; } virtual KoID colorDepthId() const { return Integer8BitsColorDepthID; } virtual int referenceDepth() const { return 8; } virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const { return new YCbCrU8ColorSpace(name(), p->clone()); } virtual QString defaultProfile() const { return QString(); } }; #endif