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

Function stbi__png_info_raw

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

Source from the content-addressed store, hash-verified

5845}
5846
5847static int stbi__png_info_raw(stbi__png* p, int* x, int* y, int* comp) {
5848 if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) {
5849 stbi__rewind(p->s);
5850 return 0;
5851 }
5852 if (x)
5853 *x = p->s->img_x;
5854 if (y)
5855 *y = p->s->img_y;
5856 if (comp)
5857 *comp = p->s->img_n;
5858 return 1;
5859}
5860
5861static int stbi__png_info(stbi__context* s, int* x, int* y, int* comp) {
5862 stbi__png p;

Callers 2

stbi__png_infoFunction · 0.85
stbi__png_is16Function · 0.85

Calls 2

stbi__parse_png_fileFunction · 0.85
stbi__rewindFunction · 0.85

Tested by

no test coverage detected