| 551 | } |
| 552 | |
| 553 | bool load_image(const char* pFilename, image& img) |
| 554 | { |
| 555 | std::string ext(string_get_extension(std::string(pFilename))); |
| 556 | |
| 557 | if (ext.length() == 0) |
| 558 | return false; |
| 559 | |
| 560 | const char *pExt = ext.c_str(); |
| 561 | |
| 562 | if (strcasecmp(pExt, "png") == 0) |
| 563 | return load_png(pFilename, img); |
| 564 | if (strcasecmp(pExt, "tga") == 0) |
| 565 | return load_tga(pFilename, img); |
| 566 | if (strcasecmp(pExt, "qoi") == 0) |
| 567 | return load_qoi(pFilename, img); |
| 568 | if ( (strcasecmp(pExt, "jpg") == 0) || (strcasecmp(pExt, "jfif") == 0) || (strcasecmp(pExt, "jpeg") == 0) ) |
| 569 | return load_jpg(pFilename, img); |
| 570 | |
| 571 | return false; |
| 572 | } |
| 573 | |
| 574 | void convert_ldr_to_hdr_image(imagef &img, const image &ldr_img, bool ldr_srgb_to_linear, float linear_nit_multiplier, float ldr_black_bias) |
| 575 | { |
no test coverage detected