MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / stbi__loadf_main

Function stbi__loadf_main

Source/Utils/stb_image.h:1459–1475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1457
1458#ifndef STBI_NO_LINEAR
1459static float *stbi__loadf_main(stbi__context *s, int *x, int *y, int *comp, int req_comp)
1460{
1461 unsigned char *data;
1462 #ifndef STBI_NO_HDR
1463 if (stbi__hdr_test(s)) {
1464 stbi__result_info ri;
1465 float *hdr_data = stbi__hdr_load(s,x,y,comp,req_comp, &ri);
1466 if (hdr_data)
1467 stbi__float_postprocess(hdr_data,x,y,comp,req_comp);
1468 return hdr_data;
1469 }
1470 #endif
1471 data = stbi__load_and_postprocess_8bit(s, x, y, comp, req_comp);
1472 if (data)
1473 return stbi__ldr_to_hdr(data, *x, *y, req_comp ? req_comp : *comp);
1474 return stbi__errpf("unknown image type", "Image not of any known type, or corrupt");
1475}
1476
1477STBIDEF float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp)
1478{

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