MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / stbi__readval

Function stbi__readval

Source/Utils/stb_image.h:6364–6376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6362} stbi__pic_packet;
6363
6364static stbi_uc *stbi__readval(stbi__context *s, int channel, stbi_uc *dest)
6365{
6366 int mask=0x80, i;
6367
6368 for (i=0; i<4; ++i, mask>>=1) {
6369 if (channel & mask) {
6370 if (stbi__at_eof(s)) return stbi__errpuc("bad file","PIC file too short");
6371 dest[i]=stbi__get8(s);
6372 }
6373 }
6374
6375 return dest;
6376}
6377
6378static void stbi__copyval(int channel,stbi_uc *dest,const stbi_uc *src)
6379{

Callers 1

stbi__pic_load_coreFunction · 0.85

Calls 2

stbi__at_eofFunction · 0.85
stbi__get8Function · 0.85

Tested by

no test coverage detected