Krita Source Code Documentation
Loading...
Searching...
No Matches
KisRgbDitherOpFactory.h
Go to the documentation of this file.
1/*
2 * This file is part of Krita
3 *
4 * SPDX-FileCopyrightText: 2021 L. E. Segovia <amy@amyspark.me>
5 *
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
8
9#include "KisDitherOpImpl.h"
10
11
12template<class srcCSTraits> inline void addStandardDitherOps(KoColorSpace *cs)
13{
14 static_assert(std::is_same<srcCSTraits, KoBgrU8Traits>::value || std::is_same<srcCSTraits, KoBgrU16Traits>::value ||
15#ifdef HAVE_OPENEXR
16 std::is_same<srcCSTraits, KoRgbF16Traits>::value ||
17#endif
18 std::is_same<srcCSTraits, KoRgbF32Traits>::value,
19 "Missing colorspace, add a transform case!");
20
21 addDitherOpsByDepth<srcCSTraits, KoBgrU8Traits>(cs, Integer8BitsColorDepthID);
22 addDitherOpsByDepth<srcCSTraits, KoBgrU16Traits>(cs, Integer16BitsColorDepthID);
23#ifdef HAVE_OPENEXR
24 addDitherOpsByDepth<srcCSTraits, KoRgbF16Traits>(cs, Float16BitsColorDepthID);
25#endif
26 addDitherOpsByDepth<srcCSTraits, KoRgbF32Traits>(cs, Float32BitsColorDepthID);
27}
void addStandardDitherOps(KoColorSpace *cs)
const KoID Float32BitsColorDepthID("F32", ki18n("32-bit float/channel"))
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"))