Skip to content

Commit

Permalink
fix: stbi_write_hdr_to_func undefined when STBI_WRITE_NO_STDIO defined
Browse files Browse the repository at this point in the history
  • Loading branch information
craftablescience committed Oct 29, 2024
1 parent 2e2bef4 commit c420269
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stb_image_write.h
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,6 @@ STBIWDEF int stbi_write_tga(char const *filename, int x, int y, int comp, const

#define stbiw__max(a, b) ((a) > (b) ? (a) : (b))

#ifndef STBI_WRITE_NO_STDIO

static void stbiw__linear_to_rgbe(unsigned char *rgbe, float *linear)
{
int exponent;
Expand Down Expand Up @@ -791,6 +789,8 @@ STBIWDEF int stbi_write_hdr_to_func(stbi_write_func *func, void *context, int x,
return stbi_write_hdr_core(&s, x, y, comp, (float *) data);
}

#ifndef STBI_WRITE_NO_STDIO

STBIWDEF int stbi_write_hdr(char const *filename, int x, int y, int comp, const float *data)
{
stbi__write_context s = { 0 };
Expand Down

0 comments on commit c420269

Please sign in to comment.