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)
Sean Barrett
b969dc38f3
stb_image_write: fix for fopen_s failure case
ago%!(EXTRA string=7 years)
Sean Barrett
094cb31ec8
stb_image: compile as C; stb_image_write: credits
ago%!(EXTRA string=7 years)
Sean Barrett
35a3bf41e8
Integrate ZLIB changed from Daniel Gibson, fixup credits
ago%!(EXTRA string=7 years)
Sean Barrett
b056850ea9
stb_image_write can flip images vertically
ago%!(EXTRA string=7 years)
John Tullos
841862a622
Fixed grammar, spelling issues in comments
...
issue #533
ago%!(EXTRA string=7 years)
John Tullos
eb17d8a6dd
Fixed grammar, spelling issues in comments
ago%!(EXTRA string=7 years)
John Tullos
32a7d5ab68
Added STBI_MSC_SECURE_CRT to support newer MSVC compilers as optional
...
For issue #533
ago%!(EXTRA string=7 years)
John Tullos
5e844ffe70
Using secure versions of CRT calls to avoid Microsoft Visual C/C++ compiler errors/warnings.
ago%!(EXTRA string=7 years)
Aarni Koskela
2c7b00ac21
Add force_filter and compression_level parameters to (new) `stbi_write_png_to_mem_ex`
...
* `force_filter` being < 0 means the original behavior (i.e. figure out
the best-performing filter per scanline); any other values 0 <= x <= 4 correspond
to PNG filters (0 = none, 1 = sub, 2 = up, 3 = average, 4 = Paeth).
* `compression_level` being < 0 equals `compression_level` 8 (the previous value).
The higher this is, the better the compression should be (though it will use
more memory).
These new parameters are not (yet) exposed for the higher-level API functions.
ago%!(EXTRA string=8 years)
Benji Smith
923c9c3deb
Correct function signature in stbi_write_jpg usage documentation.
ago%!(EXTRA string=8 years)
Sean Barrett
961923b5a3
fix documentation
ago%!(EXTRA string=8 years)