MCPcopy Create free account
hub / github.com/IENT/YUView / valid

Method valid

YUViewLib/src/decoder/decoderTarga.cpp:169–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167 }
168
169 bool valid() const
170 {
171 switch (imageType)
172 {
173 case ImageType::UncompressedIndexed:
174 case ImageType::RleIndexed:
175 return (bitsPerPixel == 8);
176 case ImageType::UncompressedRgb:
177 case ImageType::RleRgb:
178 return (bitsPerPixel == 15 || bitsPerPixel == 16 || bitsPerPixel == 24 || bitsPerPixel == 32);
179 case ImageType::UncompressedGray:
180 case ImageType::RleGray:
181 return (bitsPerPixel == 8);
182 default:
183 return false;
184 }
185 }
186
187 // Returns the number of bytes per pixel needed in an image
188 // created with this Header information.

Callers 1

readHeaderFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected