| 1457 | |
| 1458 | #ifndef STBI_NO_LINEAR |
| 1459 | static 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 | |
| 1477 | STBIDEF float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp) |
| 1478 | { |
no test coverage detected