MCPcopy Create free account
hub / github.com/Tom94/tev / nChannelsInPixelFormat

Function nChannelsInPixelFormat

src/Image.cpp:743–751  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

741}
742
743static size_t nChannelsInPixelFormat(Texture::PixelFormat pixelFormat) {
744 switch (pixelFormat) {
745 case Texture::PixelFormat::R: return 1;
746 case Texture::PixelFormat::RA: return 2;
747 case Texture::PixelFormat::RGB: return 3;
748 case Texture::PixelFormat::RGBA: return 4;
749 default: throw runtime_error{"Unsupported pixel format for texture."};
750 }
751}
752
753static size_t bitsPerSampleInComponentFormat(Texture::ComponentFormat componentFormat) {
754 switch (componentFormat) {

Callers 2

textureMethod · 0.85
updateChannelMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected