MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / stbi__bmp_test_raw

Function stbi__bmp_test_raw

include/stb/stb_image.h:5346–5359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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