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

Function stbi__bmp_info

include/stb/stb_image.h:7335–7355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7333
7334#ifndef STBI_NO_BMP
7335static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp)
7336{
7337 void *p;
7338 stbi__bmp_data info;
7339
7340 info.all_a = 255;
7341 p = stbi__bmp_parse_header(s, &info);
7342 if (p == NULL) {
7343 stbi__rewind( s );
7344 return 0;
7345 }
7346 if (x) *x = s->img_x;
7347 if (y) *y = s->img_y;
7348 if (comp) {
7349 if (info.bpp == 24 && info.ma == 0xff000000)
7350 *comp = 3;
7351 else
7352 *comp = info.ma ? 4 : 3;
7353 }
7354 return 1;
7355}
7356#endif
7357
7358#ifndef STBI_NO_PSD

Callers 1

stbi__info_mainFunction · 0.85

Calls 2

stbi__bmp_parse_headerFunction · 0.85
stbi__rewindFunction · 0.85

Tested by

no test coverage detected