diff --git a/src/include/OpenImageIO/typedesc.h b/src/include/OpenImageIO/typedesc.h index b45852c777..72d9a66b07 100644 --- a/src/include/OpenImageIO/typedesc.h +++ b/src/include/OpenImageIO/typedesc.h @@ -449,8 +449,17 @@ template struct BaseTypeFromC { static const TypeDesc:: /// The default for simple types is just the TypeDesc based on BaseTypeFromC. /// But we can specialize more complex types. template struct TypeDescFromC { static const constexpr TypeDesc value() { return TypeDesc(BaseTypeFromC::value); } }; -template<> struct TypeDescFromC { static const constexpr TypeDesc value() { return TypeDesc::INT; } }; +template<> struct TypeDescFromC { static const constexpr TypeDesc value() { return TypeDesc::INT32; } }; +template<> struct TypeDescFromC { static const constexpr TypeDesc value() { return TypeDesc::UINT32; } }; +template<> struct TypeDescFromC { static const constexpr TypeDesc value() { return TypeDesc::INT16; } }; +template<> struct TypeDescFromC { static const constexpr TypeDesc value() { return TypeDesc::UINT16; } }; +template<> struct TypeDescFromC { static const constexpr TypeDesc value() { return TypeDesc::INT8; } }; +template<> struct TypeDescFromC { static const constexpr TypeDesc value() { return TypeDesc::UINT8; } }; template<> struct TypeDescFromC { static const constexpr TypeDesc value() { return TypeDesc::FLOAT; } }; +#if defined(_HALF_H_) || defined(IMATH_HALF_H_) +template<> struct TypeDescFromC { static const constexpr TypeDesc value() { return TypeDesc::HALF; } }; +#endif +template<> struct TypeDescFromC { static const constexpr TypeDesc value() { return TypeDesc::DOUBLE; } }; template struct TypeDescFromC { static const constexpr TypeDesc value() { return TypeDesc::STRING; } }; template struct TypeDescFromC { static const constexpr TypeDesc value() { return TypeDesc::STRING; } }; #ifdef INCLUDED_IMATHVEC_H