MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / stbi__info_main

Function stbi__info_main

lite/example/cpp_example/mge/cv/stb_image.h:8325–8372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8323#endif
8324
8325static int stbi__info_main(stbi__context* s, int* x, int* y, int* comp) {
8326#ifndef STBI_NO_JPEG
8327 if (stbi__jpeg_info(s, x, y, comp))
8328 return 1;
8329#endif
8330
8331#ifndef STBI_NO_PNG
8332 if (stbi__png_info(s, x, y, comp))
8333 return 1;
8334#endif
8335
8336#ifndef STBI_NO_GIF
8337 if (stbi__gif_info(s, x, y, comp))
8338 return 1;
8339#endif
8340
8341#ifndef STBI_NO_BMP
8342 if (stbi__bmp_info(s, x, y, comp))
8343 return 1;
8344#endif
8345
8346#ifndef STBI_NO_PSD
8347 if (stbi__psd_info(s, x, y, comp))
8348 return 1;
8349#endif
8350
8351#ifndef STBI_NO_PIC
8352 if (stbi__pic_info(s, x, y, comp))
8353 return 1;
8354#endif
8355
8356#ifndef STBI_NO_PNM
8357 if (stbi__pnm_info(s, x, y, comp))
8358 return 1;
8359#endif
8360
8361#ifndef STBI_NO_HDR
8362 if (stbi__hdr_info(s, x, y, comp))
8363 return 1;
8364#endif
8365
8366// test tga last because it's a crappy test!
8367#ifndef STBI_NO_TGA
8368 if (stbi__tga_info(s, x, y, comp))
8369 return 1;
8370#endif
8371 return stbi__err("unknown image type", "Image not of any known type, or corrupt");
8372}
8373
8374static int stbi__is_16_main(stbi__context* s) {
8375#ifndef STBI_NO_PNG

Callers 3

stbi_info_from_fileFunction · 0.85
stbi_info_from_memoryFunction · 0.85
stbi_info_from_callbacksFunction · 0.85

Calls 10

stbi__jpeg_infoFunction · 0.85
stbi__png_infoFunction · 0.85
stbi__gif_infoFunction · 0.85
stbi__bmp_infoFunction · 0.85
stbi__psd_infoFunction · 0.85
stbi__pic_infoFunction · 0.85
stbi__pnm_infoFunction · 0.85
stbi__hdr_infoFunction · 0.85
stbi__tga_infoFunction · 0.85
stbi__errFunction · 0.85

Tested by

no test coverage detected