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

Function stbi__jpeg_info_raw

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

Source from the content-addressed store, hash-verified

4390}
4391
4392static int stbi__jpeg_info_raw(stbi__jpeg* j, int* x, int* y, int* comp) {
4393 if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) {
4394 stbi__rewind(j->s);
4395 return 0;
4396 }
4397 if (x)
4398 *x = j->s->img_x;
4399 if (y)
4400 *y = j->s->img_y;
4401 if (comp)
4402 *comp = j->s->img_n >= 3 ? 3 : 1;
4403 return 1;
4404}
4405
4406static int stbi__jpeg_info(stbi__context* s, int* x, int* y, int* comp) {
4407 int result;

Callers 1

stbi__jpeg_infoFunction · 0.85

Calls 2

stbi__decode_jpeg_headerFunction · 0.85
stbi__rewindFunction · 0.85

Tested by

no test coverage detected