Fixes following errors:
error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
First, we must not forget to call `avifImageDestroy()` when we're
finished with the image.
Then we also need to cater to the allocated `dataBuf`. To keep track
of that, we "extend" `avifIO` as `avifIOCtxReader`. To simplify, and
to avoid unnecessary allocations, we use `realloc()`. To better fit
with GD, we also use the GD memory allocation functions instead of the
ones provided by libavif.
* Enable webpng on MINGW
* Detect GD version using cmake language
* Use _aligned_malloc instead of posix_memalign on Windows
* Include missing "errno.h"
* Fix finding WEBP on MINGW
* Fix finding XPM on MINGW
* Use PkgConfig to find packages on MINGW
* CI: Enable more options for MINGW
* Fix#806, getPixelInterpolateWeight, getPixelOverflowTC, getPixelOverflowPalette, gdImageRotate* take bgcolor as GD's truecolor, result is a TC image as well.Clean dead code.
* Not needed at this stage
* #797 possible leak on png error, returns from setjmp lost the row_pointers ref somehow
* skip that one using mingw until we have a reliable portable FP related tests suites (may never happpen)
Since #737 gdImageColorTransparent does not correctly handle the case that im->transparent = -1
(which is the initial value and used to indicate no transparent colour has been set).
This leads to undefined behaviour via an out-of-bound write:
im->alpha[im->transparent] = gdAlphaOpaque;
(in practice I assume this merely overwrites an earlier struct member)
This can be triggered via loading a gif through gdImageCreateFromGifPtr
third_party/gd/source/gd.c:922:2: runtime error: index -1 out of bounds for type 'int [256]'
#0 0x5629c034a839 in gdImageColorTransparent third_party/gd/source/gd.c:922:29
#1 0x5629c034ebf0 in gdImageCreateFromGifCtx third_party/gd/source/gd_gif_in.c:328:4
#2 0x5629c034f14f in gdImageCreateFromGifPtr third_party/gd/source/gd_gif_in.c:186:7
Fixes#784.
There are small typos in:
- examples/copyrotated.c
- src/gd.c
- src/gd.h
- src/gd_avif.c
- src/gd_nnquant.c
- src/gd_tga.c
- src/gd_topal.c
- src/wbmp.c
- tests/avif/compare_avif_to_png.c
Fixes:
- Should read `requires` rather than `reqiures`.
- Should read `of the` rather than `ofthe`.
- Should read `memory` rather than `memmory`.
- Should read `maximum` rather than `maxmum`.
- Should read `intersection` rather than `intertersection`.
- Should read `hypotenuse` rather than `hypothenus`.
- Should read `flexibility` rather than `flexibilty`.
- Should read `always` rather than `alwasy`.
- Should read `also` rather than `alos`.