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

Function stbi__jpeg_test

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

Source from the content-addressed store, hash-verified

4377}
4378
4379static int stbi__jpeg_test(stbi__context* s) {
4380 int r;
4381 stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg));
4382 if (!j)
4383 return stbi__err("outofmem", "Out of memory");
4384 j->s = s;
4385 stbi__setup_jpeg(j);
4386 r = stbi__decode_jpeg_header(j, STBI__SCAN_type);
4387 stbi__rewind(s);
4388 STBI_FREE(j);
4389 return r;
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)) {

Callers 1

stbi__load_mainFunction · 0.85

Calls 5

stbi__mallocFunction · 0.85
stbi__errFunction · 0.85
stbi__setup_jpegFunction · 0.85
stbi__decode_jpeg_headerFunction · 0.85
stbi__rewindFunction · 0.85

Tested by

no test coverage detected