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

Function read32AsRgb

YUViewLib/src/decoder/decoderTarga.cpp:239–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239color_t read32AsRgb(std::ifstream &file, bool hasAlpha)
240{
241 const uint8_t b = read8(file);
242 const uint8_t g = read8(file);
243 const uint8_t r = read8(file);
244 uint8_t a = read8(file);
245 if (!hasAlpha)
246 a = 255;
247 return rgba(r, g, b, a);
248}
249
250void setColorInImage(
251 dec::Targa::Image &image, color_t color, unsigned x, unsigned y, const Header &header)

Callers 2

readRunLengthColorFunction · 0.85
readImageFunction · 0.85

Calls 2

read8Function · 0.85
rgbaFunction · 0.85

Tested by

no test coverage detected