Krita Source Code Documentation
Loading...
Searching...
No Matches
KisGrayDitherOpFactory.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
11template<class srcCSTraits> inline void addStandardDitherOps(KoColorSpace *cs)
12{
13 static_assert(std::is_same<srcCSTraits, KoGrayU8Traits>::value || std::is_same<srcCSTraits, KoGrayU16Traits>::value ||
14#ifdef HAVE_OPENEXR
15 std::is_same<srcCSTraits, KoGrayF16Traits>::value ||
16#endif
17 std::is_same<srcCSTraits, KoGrayF32Traits>::value,
18 "Missing colorspace, add a transform case!");
19
20 addDitherOpsByDepth<srcCSTraits, KoGrayU8Traits>(cs, Integer8BitsColorDepthID);
21 addDitherOpsByDepth<srcCSTraits, KoGrayU16Traits>(cs, Integer16BitsColorDepthID);
22#ifdef HAVE_OPENEXR
23 addDitherOpsByDepth<srcCSTraits, KoGrayF16Traits>(cs, Float16BitsColorDepthID);
24#endif
25 addDitherOpsByDepth<srcCSTraits, KoGrayF32Traits>(cs, Float32BitsColorDepthID);
26}
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"))