18template <
typename alpha_channel_type>
29 void transform(
const quint8 *src, quint8 *dst, qint32 nPixels)
const override
31 const alpha_channel_type *srcPtr =
reinterpret_cast<const alpha_channel_type*
>(src);
51template <
typename alpha_channel_type>
62 void transform(
const quint8 *src, quint8 *dst, qint32 nPixels)
const override
64 const alpha_channel_type *srcPtr =
reinterpret_cast<const alpha_channel_type*
>(src);
65 quint16 *dstPtr =
reinterpret_cast<quint16*
>(dst);
81template <
typename alpha_channel_type,
typename gray_channel_type>
92 void transform(
const quint8 *src, quint8 *dst, qint32 nPixels)
const override {
93 const alpha_channel_type *srcPtr =
reinterpret_cast<const alpha_channel_type*
>(src);
94 gray_channel_type *dstPtr =
reinterpret_cast<gray_channel_type*
>(dst);
109template<
typename alpha_channel_type>
115 _dstModelId, _dstDepthId, _dstProfileName)
119template<
typename alpha_channel_type>
125 KoColorConversionTransformation::ConversionFlags conversionFlags)
const
127 Q_ASSERT(canBeSource(srcColorSpace));
128 Q_ASSERT(canBeDestination(dstColorSpace));
169template <
typename alpha_channel_type>
178 void transform(
const quint8 *src, quint8 *dst, qint32 nPixels)
const override {
179 alpha_channel_type *dstPtr =
reinterpret_cast<alpha_channel_type*
>(dst);
182 qint32 pixelSize = srcColorSpace()->pixelSize();
184 while (nPixels > 0) {
185 srcColorSpace()->toLabA16(src, (quint8*)data, 1);
196template <
typename alpha_channel_type>
202 KoColorConversionTransformation::ConversionFlags conversionFlags)
207 void transform(
const quint8 *src, quint8 *dst, qint32 nPixels)
const override
209 const quint16 *srcPtr =
reinterpret_cast<const quint16*
>(src);
210 alpha_channel_type *dstPtr =
reinterpret_cast<alpha_channel_type*
>(dst);
212 while (nPixels > 0) {
225template <
typename gray_channel_type,
typename alpha_channel_type>
232 ConversionFlags conversionFlags)
237 void transform(
const quint8 *src, quint8 *dst, qint32 nPixels)
const override
239 const gray_channel_type *srcPtr =
reinterpret_cast<const gray_channel_type*
>(src);
240 alpha_channel_type *dstPtr =
reinterpret_cast<alpha_channel_type*
>(dst);
242 while (nPixels > 0) {
255template <
typename alpha_channel_type>
263template <
typename alpha_channel_type>
269 KoColorConversionTransformation::ConversionFlags conversionFlags)
const
271 Q_ASSERT(canBeSource(srcColorSpace));
272 Q_ASSERT(canBeDestination(dstColorSpace));
KoID colorDepthIdForChannelType()
const KoID Float32BitsColorDepthID("F32", ki18n("32-bit float/channel"))
const KoID GrayAColorModelID("GRAYA", ki18n("Grayscale/Alpha"))
const KoID AlphaColorModelID("A", ki18n("Alpha mask"))
const KoID Float16BitsColorDepthID("F16", ki18n("16-bit float/channel"))
const KoID Integer8BitsColorDepthID("U8", ki18n("8-bit integer/channel"))
const KoID Integer16BitsColorDepthID("U16", ki18n("16-bit integer/channel"))
const KoID LABAColorModelID("LABA", ki18n("L*a*b*/Alpha"))
uint UINT16_MULT(uint a, uint b)
static _Tdst scaleToA(_T a)
virtual quint32 pixelSize() const =0
virtual KoID colorModelId() const =0
virtual void fromLabA16(const quint8 *src, quint8 *dst, quint32 nPixels) const
virtual KoID colorDepthId() const =0