MCPcopy Create free account
hub / github.com/MrKepzie/Natron / getDefaultColorSpaceForBitDepth

Method getDefaultColorSpaceForBitDepth

Engine/Project.cpp:2113–2133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2111}
2112
2113ViewerColorSpaceEnum
2114Project::getDefaultColorSpaceForBitDepth(ImageBitDepthEnum bitdepth) const
2115{
2116 switch (bitdepth) {
2117 case eImageBitDepthByte:
2118
2119 return colorspaceParamIndexToEnum(_imp->colorSpace8u->getValue());
2120 case eImageBitDepthShort:
2121
2122 return colorspaceParamIndexToEnum(_imp->colorSpace16u->getValue());
2123 case eImageBitDepthHalf: // same colorspace as float
2124 case eImageBitDepthFloat:
2125
2126 return colorspaceParamIndexToEnum(_imp->colorSpace32f->getValue());
2127 case eImageBitDepthNone:
2128 assert(false);
2129 break;
2130 }
2131
2132 return eViewerColorSpaceLinear;
2133}
2134
2135// Functions to escape / unescape characters from XML strings
2136// Note that the unescape function matches the escape function,

Callers 8

renderMethod · 0.45
renderHandlerMethod · 0.45
renderViewer_internalMethod · 0.45
getRotoContextMethod · 0.45
renderMethod · 0.45
getColorAtMethod · 0.45
getColorAtRectMethod · 0.45

Calls 2

getValueMethod · 0.45

Tested by

no test coverage detected