in ReadAnimatedWebP() & ReadAnimatedGIF() when AllocateFrames() fails
due to OOM
Tested:
for i in `seq 1 278`; do
export MALLOC_FAIL_AT=$i
./examples/anim_diff webp1 webp2
./examples/anim_diff gif1 gif2
done
Change-Id: I5d486c2c2982ae088e34a25d8e3e0188df1a9b51
Define macros in examples/unicode.h to use Unicode argv
on Windows. Keep char everywhere on Unix since it handles
UTF-8 without any change.
Impact:
- All fopen () and SHCreateStreamOnFile(),
- All fprintf() printing file paths,
- All strcmp() used with "-",
- File path parsing,
- Gif reading.
Concerned executables from examples/ and extras/:
anim_diff, anim_dump, vwebp, vwebp_sdl,
cwebp, dwebp, gif2webp, img2webp,
webpmux, webpinfo, webp_quality, get_disto
When compiled on Windows with Unicode enabled, webpmux and
img2webp will not work when used with an argument file and
will print "Reading arguments from a file is a feature
unavailable with Unicode binaries."
BUG=webp:398
Change-Id: Ic55d222a3ce1a715f9c4cce57ecbe2705d5ce317
GIFDisplayError() is already defined exactly the same way
in gifdec. Remove it from anim_util.c and add dependency.
Change-Id: Iec01b41c44d0b61b3a279b8cd754d9917d64f804
with loop_compatibility disabled (the default), non-zero loop counts
will be incremented by 1 for browser rendering compatibility. the max,
65535, is a special case as the muxer will fail if it is exceeded; avoid
increasing the limit in this case. this isn't 100% correct, but should
be close enough given the high number of iterations.
BUG=webp:382
Change-Id: Icde3e98a58e9ee89604a72fafda30ab71060dec5
This is to harmonize the -h/-version options on all our examples.
+ added GetAnimatedImageVersions() method to anim_util.*
Change-Id: I2304a1c29e310682e97f236d3867274a192a7a09
this is consistent with web browser behavior as well as various
transcoding tools (ffmpeg, gif2apng, etc).
also: update anim_diff to account for this new behaviour.
BUG=webp:379
Change-Id: I70cc72a6b401ef32b73cd182a3f12d993d495bf4
the sizes are already validated by CheckSizeForOverflow(), add casts to
size_t to avoid -Wshorten-64-to-32
Change-Id: Ida9102c2104f4a334a0ad16d6e01a12bedfd4eec
some multiplies here and there needed some extra checks
and error reporting. Even if width * height is guaranteed
to be < 2**32, we were multiplying by num_channels and
triggering a 32b overflow.
Some multiplies were not using size_t or uint64_t, additionally.
Change-Id: If2a35b94c8af204135f4b88a7fd63850aa381bbf
Change it from transparent white to transparent black, which matches
the transparent color assumed in Webp dispose-to-background method.
Also pre-multiply background colors before comparison in anim_diff,
just as what is done with regular pixel values.
Change-Id: I5a790522df21619c666ce499f73e42294ed276f2
+ jenkins fixes for native config (library order)
+ add a missing -lm
+ replace log10 by log, just in case
+ partially reverted configure.ac to remove the C++ part
Change-Id: Iee099c544451b23c6cfaca53d5a95d2d332e066e