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

Function stbi__loadf_main

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

Source from the content-addressed store, hash-verified

1494
1495#ifndef STBI_NO_LINEAR
1496static float* stbi__loadf_main(
1497 stbi__context* s, int* x, int* y, int* comp, int req_comp) {
1498 unsigned char* data;
1499#ifndef STBI_NO_HDR
1500 if (stbi__hdr_test(s)) {
1501 stbi__result_info ri;
1502 float* hdr_data = stbi__hdr_load(s, x, y, comp, req_comp, &ri);
1503 if (hdr_data)
1504 stbi__float_postprocess(hdr_data, x, y, comp, req_comp);
1505 return hdr_data;
1506 }
1507#endif
1508 data = stbi__load_and_postprocess_8bit(s, x, y, comp, req_comp);
1509 if (data)
1510 return stbi__ldr_to_hdr(data, *x, *y, req_comp ? req_comp : *comp);
1511 return stbi__errpf("unknown image type", "Image not of any known type, or corrupt");
1512}
1513
1514STBIDEF float* stbi_loadf_from_memory(
1515 stbi_uc const* buffer, int len, int* x, int* y, int* comp, int req_comp) {

Callers 3

stbi_loadf_from_memoryFunction · 0.85
stbi_loadf_from_fileFunction · 0.85

Calls 5

stbi__hdr_testFunction · 0.85
stbi__hdr_loadFunction · 0.85
stbi__float_postprocessFunction · 0.85
stbi__ldr_to_hdrFunction · 0.85

Tested by

no test coverage detected