mirror of
https://github.com/nothings/stb
synced 2024-12-15 12:22:55 +03:00
added support for RGBE header HDR files
This commit is contained in:
parent
996ccf2159
commit
a2defc3d7a
@ -6147,10 +6147,11 @@ static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int re
|
||||
int len;
|
||||
unsigned char count, value;
|
||||
int i, j, k, c1,c2, z;
|
||||
|
||||
const char *headerToken;
|
||||
|
||||
// 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");
|
||||
|
||||
// Parse header
|
||||
|
Loading…
Reference in New Issue
Block a user