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

Function stbi__psd_is16

include/stb/stb_image.h:7394–7419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7392}
7393
7394static int stbi__psd_is16(stbi__context *s)
7395{
7396 int channelCount, depth;
7397 if (stbi__get32be(s) != 0x38425053) {
7398 stbi__rewind( s );
7399 return 0;
7400 }
7401 if (stbi__get16be(s) != 1) {
7402 stbi__rewind( s );
7403 return 0;
7404 }
7405 stbi__skip(s, 6);
7406 channelCount = stbi__get16be(s);
7407 if (channelCount < 0 || channelCount > 16) {
7408 stbi__rewind( s );
7409 return 0;
7410 }
7411 STBI_NOTUSED(stbi__get32be(s));
7412 STBI_NOTUSED(stbi__get32be(s));
7413 depth = stbi__get16be(s);
7414 if (depth != 16) {
7415 stbi__rewind( s );
7416 return 0;
7417 }
7418 return 1;
7419}
7420#endif
7421
7422#ifndef STBI_NO_PIC

Callers 1

stbi__is_16_mainFunction · 0.85

Calls 4

stbi__get32beFunction · 0.85
stbi__rewindFunction · 0.85
stbi__get16beFunction · 0.85
stbi__skipFunction · 0.85

Tested by

no test coverage detected