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

Function stbi_load_from_file

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

Source from the content-addressed store, hash-verified

1405}
1406
1407STBIDEF stbi_uc* stbi_load_from_file(FILE* f, int* x, int* y, int* comp, int req_comp) {
1408 unsigned char* result;
1409 stbi__context s;
1410 stbi__start_file(&s, f);
1411 result = stbi__load_and_postprocess_8bit(&s, x, y, comp, req_comp);
1412 if (result) {
1413 // need to 'unget' all the characters in the IO buffer
1414 fseek(f, -(int)(s.img_buffer_end - s.img_buffer), SEEK_CUR);
1415 }
1416 return result;
1417}
1418
1419STBIDEF stbi__uint16* stbi_load_from_file_16(
1420 FILE* f, int* x, int* y, int* comp, int req_comp) {

Callers 1

stbi_loadFunction · 0.85

Calls 2

stbi__start_fileFunction · 0.85

Tested by

no test coverage detected