| 2243 | } |
| 2244 | |
| 2245 | ViewerColorSpaceEnum |
| 2246 | Project::getDefaultColorSpaceForBitDepth(ImageBitDepthEnum bitdepth) const |
| 2247 | { |
| 2248 | switch (bitdepth) { |
| 2249 | case eImageBitDepthByte: |
| 2250 | |
| 2251 | return colorspaceParamIndexToEnum(_imp->colorSpace8u->getValue()); |
| 2252 | case eImageBitDepthShort: |
| 2253 | |
| 2254 | return colorspaceParamIndexToEnum(_imp->colorSpace16u->getValue()); |
| 2255 | case eImageBitDepthHalf: // same colorspace as float |
| 2256 | case eImageBitDepthFloat: |
| 2257 | |
| 2258 | return colorspaceParamIndexToEnum(_imp->colorSpace32f->getValue()); |
| 2259 | case eImageBitDepthNone: |
| 2260 | assert(false); |
| 2261 | break; |
| 2262 | } |
| 2263 | |
| 2264 | return eViewerColorSpaceLinear; |
| 2265 | } |
| 2266 | |
| 2267 | // Functions to escape / unescape characters from UTF-8 XML strings. |
| 2268 | // Note that the unescape function matches the escape function, |
no test coverage detected