| 25 | { |
| 26 | |
| 27 | unsigned int GetImageChannelIndex(ImageChannelLayout channelLayout, ImageChannel channel) |
| 28 | { |
| 29 | switch (channelLayout) |
| 30 | { |
| 31 | case ImageChannelLayout::Rgb: |
| 32 | return static_cast<unsigned int>(channel); |
| 33 | case ImageChannelLayout::Bgr: |
| 34 | return 2u - static_cast<unsigned int>(channel); |
| 35 | default: |
| 36 | throw UnknownImageChannelLayout(fmt::format("Unknown layout {}", static_cast<int>(channelLayout))); |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | inline float Lerp(float a, float b, float w) |
| 41 | { |
no test coverage detected