MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / stbi__loadf_main

Function stbi__loadf_main

include/stb/stb_image.h:1460–1476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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