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

Function stbi_load

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

Source from the content-addressed store, hash-verified

1394}
1395
1396STBIDEF stbi_uc* stbi_load(
1397 char const* filename, int* x, int* y, int* comp, int req_comp) {
1398 FILE* f = stbi__fopen(filename, "rb");
1399 unsigned char* result;
1400 if (!f)
1401 return stbi__errpuc("can't fopen", "Unable to open file");
1402 result = stbi_load_from_file(f, x, y, comp, req_comp);
1403 fclose(f);
1404 return result;
1405}
1406
1407STBIDEF stbi_uc* stbi_load_from_file(FILE* f, int* x, int* y, int* comp, int req_comp) {
1408 unsigned char* result;

Callers 2

preprocess_imageFunction · 0.85
detect_yoloxFunction · 0.85

Calls 2

stbi__fopenFunction · 0.85
stbi_load_from_fileFunction · 0.85

Tested by

no test coverage detected