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

Function stbi__bmp_test_raw

Source/Utils/stb_image.h:5343–5356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5341
5342#ifndef STBI_NO_BMP
5343static int stbi__bmp_test_raw(stbi__context *s)
5344{
5345 int r;
5346 int sz;
5347 if (stbi__get8(s) != 'B') return 0;
5348 if (stbi__get8(s) != 'M') return 0;
5349 stbi__get32le(s); // discard filesize
5350 stbi__get16le(s); // discard reserved
5351 stbi__get16le(s); // discard reserved
5352 stbi__get32le(s); // discard data offset
5353 sz = stbi__get32le(s);
5354 r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124);
5355 return r;
5356}
5357
5358static int stbi__bmp_test(stbi__context *s)
5359{

Callers 1

stbi__bmp_testFunction · 0.85

Calls 3

stbi__get8Function · 0.85
stbi__get32leFunction · 0.85
stbi__get16leFunction · 0.85

Tested by

no test coverage detected