|
|
@ -6147,10 +6147,11 @@ static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int re |
|
|
|
int len; |
|
|
|
int len; |
|
|
|
unsigned char count, value; |
|
|
|
unsigned char count, value; |
|
|
|
int i, j, k, c1,c2, z; |
|
|
|
int i, j, k, c1,c2, z; |
|
|
|
|
|
|
|
const char *headerToken; |
|
|
|
|
|
|
|
|
|
|
|
// Check identifier
|
|
|
|
// Check identifier
|
|
|
|
if (strcmp(stbi__hdr_gettoken(s,buffer), "#?RADIANCE") != 0) |
|
|
|
headerToken = stbi__hdr_gettoken(s,buffer); |
|
|
|
|
|
|
|
if (strcmp(headerToken, "#?RADIANCE") != 0 && strcmp(headerToken, "#?RGBE") != 0) |
|
|
|
return stbi__errpf("not HDR", "Corrupt HDR image"); |
|
|
|
return stbi__errpf("not HDR", "Corrupt HDR image"); |
|
|
|
|
|
|
|
|
|
|
|
// Parse header
|
|
|
|
// Parse header
|
|
|
|