7#ifndef KOCOLORMODELSTANDARDIDSUTILS_H
8#define KOCOLORMODELSTANDARDIDSUTILS_H
18template <
typename channel_type>
30template<>
inline KoID colorDepthIdForChannelType<half>() {
43template <
template <
typename T>
class Functor,
45 typename Result =
decltype(std::declval<Functor<quint8>>()(std::declval<Args>()...))>
49 return Functor<quint8>()(args...);
51 return Functor<quint16>()(args...);
54 return Functor<half>()(args...);
57 return Functor<float>()(args...);
60 throw std::runtime_error(
"Invalid bit depth!");
KoID colorDepthIdForChannelType()
KoID colorDepthIdForChannelType< quint16 >()
KoID colorDepthIdForChannelType< quint8 >()
KoID colorDepthIdForChannelType< double >()
KoID colorDepthIdForChannelType< float >()
Result channelTypeForColorDepthId(const KoID &depthId, Args... args)
const KoID Float32BitsColorDepthID("F32", ki18n("32-bit float/channel"))
const KoID Float64BitsColorDepthID("F64", ki18n("64-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"))