Sean Barrett
1ee679ca2e
update version numbers
ago%!(EXTRA string=4 years)
Fabian Giesen
1e1efbdc75
stb_image_write: Make globals extern "C" in C++
...
Fixes issue #921
ago%!(EXTRA string=4 years)
Fabian Giesen
b14a80784c
stb_image_write: Support writing BMPs with alpha
...
Fixes issue #1159 .
ago%!(EXTRA string=4 years)
Andrew Kensler
db6e91b7d8
Store uncompressed if compression was worse
...
If the data was uncompressible and this deflate implementation expanded
by more than the overhead of simply storing it uncompressed, fall back
to deflate's uncompressed storage mode. This bounds the maximum deflated
size at the original size plus an overhead of 6 fixed bytes with another
5 bytes per 32767 byte block.
Fixes issue #948 .
ago%!(EXTRA string=4 years)
Fabian Giesen
a5e40739ac
stb_image_write: Fix define tested for sprintf_s
...
Fixes issue 744.
ago%!(EXTRA string=4 years)
Fabian Giesen
ba3ba9b78c
stb_image_write: Disable HDR writer completely in NO_STDIO build
...
Fixes issue #793 , hopefully.
ago%!(EXTRA string=4 years)
Fabian Giesen
76f55ac210
stb_image_write: STBI_WINDOWS_UTF8 -> STBIW_WINDOWS_UTF8
...
Fixes issue #925 .
ago%!(EXTRA string=4 years)
Fabian Giesen
81bcfa9043
stb_image_write: Remove tabs
...
Whitespace-only change.
ago%!(EXTRA string=4 years)
Fabian Giesen
2506215e8a
stb_image: Key Win32 UTF-8 support off _WIN32 not _MSC_VER
...
So that it also works on MinGW.
Fixes issue #729 .
ago%!(EXTRA string=4 years)
Fabian Giesen
991f1f6419
stb_image: Fix wrong buffer sizes passed to MultiByteToWideChar
...
Fixes issue #772 .
ago%!(EXTRA string=4 years)
Fabian Giesen
6d857933d5
stb_image, stb_image_write: Fix compare sign warnings
...
For the stb_image fix, also replace the magic 288 with a more
descriptive name while I'm at it.
Fixes #1100
ago%!(EXTRA string=4 years)
Fabian Giesen
a0231a9e94
stb_image: Key Win32 UTF-8 support off _WIN32 not _MSC_VER
...
So that it also works on MinGW.
Fixes issue #729 .
ago%!(EXTRA string=4 years)
Fabian Giesen
e3a63f3793
stb_image: Fix wrong buffer sizes passed to MultiByteToWideChar
...
Fixes issue #772 .
ago%!(EXTRA string=4 years)
Fabian Giesen
4d067e8b2b
stb_image, stb_image_write: Fix compare sign warnings
...
For the stb_image fix, also replace the magic 288 with a more
descriptive name while I'm at it.
Fixes #1100
ago%!(EXTRA string=4 years)
Sean Barrett
314d0a6f9a
update version numbers
ago%!(EXTRA string=5 years)
Sean Barrett
523a14f3e1
stb_image_write: small buffer to avoid calling fwrite on every pixel
ago%!(EXTRA string=5 years)
Sean Barrett
2bb4a0accd
Fix trailing whitespace
ago%!(EXTRA string=5 years)
Sean Barrett
5e4a0617b7
udpate version numbers
ago%!(EXTRA string=5 years)
Sean Barrett
24fdc35c90
stb_image_write: fix jpeg to work on non-C99 compilers
ago%!(EXTRA string=5 years)
Daniel Gibson
15516199e5
stb_image_write: Update JPEG code to jo_jpeg 1.60
...
For quality <= 90, it now supports subsampling U and V
so it encodes smaller files.
See https://www.jonolick.com/home/jo_jpeg-release-160 for more info
about jo_jpeg 1.60
ago%!(EXTRA string=5 years)
Andrew Kensler
57b9ea6510
Quell -Wcast-align warnings from Clang
...
The stbi__sbraw() macro in stb_image_write.h causes Clang to spew about 24
warnings complaining that "cast from 'unsigned char *' to 'int *' increases
required alignment from 1 to 4" when compiled with the -Wcast-align option.
In practice, this is spurious so long as STBIW_MALLOC() and STBIW_REALLOC()
follow the usual alignment semantics for malloc() and realloc() in that they
align sufficiently for any built-in type.
To quell the warning, we can cast through a void pointer as an intermediary.
ago%!(EXTRA string=6 years)
Niclas Olmenius
da12942957
stb_image_write: fix clang warning
...
fix -Wmissing-variable-declarations clang warning
`stbi__flip_vertically_on_write` is now static like
`stbi__vertically_flip_on_load` in `stb_image.h`
ago%!(EXTRA string=6 years)
Sean Barrett
787f1d646a
Update version numbers
ago%!(EXTRA string=6 years)
Sean Barrett
7638200f0b
Remove old documentation re: SECURE_CRT
ago%!(EXTRA string=6 years)
Sean Barrett
2c2908f505
update version numbers
ago%!(EXTRA string=6 years)
Sean Barrett
a0b521fcf2
no warnings when compiling /W3
...
compiling all test cases and compilers in test.sbm
Compilers:
32-bit:
VS2015
VS2013
VS2008
VC6 (1998)
clang-cl 9.0.1
64-bit
VS2015
clang-cl 9.0.1
ago%!(EXTRA string=6 years)
kroko
a2cd79b8ff
fix comma warnings when building with -Wcomma
ago%!(EXTRA string=6 years)
Sean Barrett
c963e40972
update version numbers
ago%!(EXTRA string=6 years)
Fabian Giesen
980add9725
stb_image_write: Fix JPEG writer bug.
ago%!(EXTRA string=6 years)
Sean Barrett
63b59b46b0
update version numbers
ago%!(EXTRA string=6 years)
Sean Barrett
feb9de355d
stb_image_write: add missing 'static' on internal functions
ago%!(EXTRA string=6 years)
Sean Barrett
ddccc72c5b
stb_image_write: optimize other PNG loops besides previous merge
ago%!(EXTRA string=6 years)
Sean Barrett
79a7719c37
stb_image: fix d1252e1bb9
for building in C
ago%!(EXTRA string=6 years)
Sean Barrett
476c1f89a2
stb_image_write: fix the previous fix (incorrectly labelled as stb_image)
ago%!(EXTRA string=6 years)
Sean Barrett
e5d4d6fcce
stb_image; optimize row computation in PR
ago%!(EXTRA string=6 years)
Sean Barrett
f82dbd638c
windows unicode: don't malloc buffers, add explicit STBI_WINDOWS_UTF8 #define
ago%!(EXTRA string=6 years)
Andrew Beatty
eee50c079d
Update to STB conventions
ago%!(EXTRA string=6 years)
Andrew Beatty
ccc4b3716a
fix compiler warnings and const error
ago%!(EXTRA string=6 years)
jarnoh
60a5755478
use simple memcpy if png filter=0
ago%!(EXTRA string=7 years)
jarnoh
7a02732eb3
allow STBIW_CRC32 override default crc32
ago%!(EXTRA string=7 years)
Daniel Gibson
1ad30e4e77
stb_image_write.h: Fix jpg flipping for non-multiple-of-8 sizes
...
JPG always encodes 8x8 pixel blocks. If the input image does not have
a width or height that's a multiple of 8, the last column or row is just
used multiple times for the remaining pixels of the block.
The original code first calculated p (the index into the pixel data)
with the "imaginary" row/colum (that might be up to 7 pixels too far
into each direction) and then subtracted the necessary amount of bytes
it if row >= height or col >= width.
That was a bit cryptic (IMHO), and didn't get more readable/obvious when
vertical flipping was added - which introduced a bug, by not taking
stbi__flip_vertically_on_write into account when adjusting p for
row >= height...
The code should be more obvious (and less buggy) now.
This fixes bug #592
ago%!(EXTRA string=7 years)
PopPoLoPoPpo
f685ee4e58
Fix overflow in stbi_write_hdr_core()
...
b056850ea9
left an additional multiplication by x,
leading to overflow.
ago%!(EXTRA string=7 years)
JR
d0ae424061
Re added unicode filename support for stb_image and stb_image_write with whitespace issues fixed.
ago%!(EXTRA string=7 years)
Sean Barrett
543ad0c112
stb_image_write: tweak handling of STB_IMAGE_WRITE_STATIC
ago%!(EXTRA string=7 years)
Sean Barrett
aeb2b4b64d
tweak handling of STBIWDEF
ago%!(EXTRA string=7 years)
Sean Barrett
dbf0fab1c7
stb_image_write: credits
ago%!(EXTRA string=7 years)
Sean Barrett
4eef034d52
stb_write_image: fix typos
ago%!(EXTRA string=7 years)
Cap Petschulat
6ab920bb6a
stb_image_write: fix png compression level typos
ago%!(EXTRA string=7 years)
Simon Rodriguez
34f087ce4c
stb_image_write: fix indexing error when computing PNG filters with the stbi__flip_vertically_on_write on.
...
The PNG filters of the pixels row N are computed using row N-1 of the final image. If the image should be flipped when saving, this corresponds to row N+1 of the initial image.
ago%!(EXTRA string=7 years)
Sean Barrett
445473bdb5
stb_image_write: handle malloc failure in zlib
ago%!(EXTRA string=7 years)