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

Function stbi__check_png_header

Source/Utils/stb_image.h:4620–4627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4618}
4619
4620static int stbi__check_png_header(stbi__context *s)
4621{
4622 static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 };
4623 int i;
4624 for (i=0; i < 8; ++i)
4625 if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig","Not a PNG");
4626 return 1;
4627}
4628
4629typedef struct
4630{

Callers 2

stbi__parse_png_fileFunction · 0.85
stbi__png_testFunction · 0.85

Calls 2

stbi__get8Function · 0.85
stbi__errFunction · 0.85

Tested by

no test coverage detected