nothings / stb

stb single-file public domain libraries for C/C++
https://twitter.com/nothings
Other
26.58k stars 7.7k forks source link

stb_image_write.h -> stbi_write_hdr is broken? #965

Open OlegAntipov opened 4 years ago

OlegAntipov commented 4 years ago

I just tried to run image_write_test.c and noticed that the HDR file is not being written correctly, in particular, the "exposure...." part is missing there. I tried to restore the "exposure..." part manually, and here is what I got instead of "F" in the end: 1 2

OlegAntipov commented 4 years ago

Oh, my fault. It looks like I needed to add "#undef __STDC_WANT_SECURE_LIB__" before includding stb_image_write.h

nothings commented 4 years ago

If it seems to work but writes a bad file, I think that's a bug.

rygorous commented 3 years ago

I can't reproduce this problem with neither VC++ 2017/2019 on Windows nor gcc-9.3.0 on Ubuntu 20.04. What compiler/OS combo are you on?