Skip to content

Commit 061dd83

Browse files
fix: stbi_write_hdr_to_func undefined when STBI_WRITE_NO_STDIO defined
1 parent b88ef7c commit 061dd83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stb_image_write.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -634,8 +634,6 @@ STBIWDEF int stbi_write_tga(char const *filename, int x, int y, int comp, const
634634

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

637-
#ifndef STBI_WRITE_NO_STDIO
638-
639637
static void stbiw__linear_to_rgbe(unsigned char *rgbe, float *linear)
640638
{
641639
int exponent;
@@ -791,6 +789,8 @@ STBIWDEF int stbi_write_hdr_to_func(stbi_write_func *func, void *context, int x,
791789
return stbi_write_hdr_core(&s, x, y, comp, (float *) data);
792790
}
793791

792+
#ifndef STBI_WRITE_NO_STDIO
793+
794794
STBIWDEF int stbi_write_hdr(char const *filename, int x, int y, int comp, const float *data)
795795
{
796796
stbi__write_context s = { 0 };

0 commit comments

Comments
 (0)