`jpegtran -copy all` may be able to process the file into something
libjpeg can read.
Bug: webp:562
Change-Id: I27a8a7a841c1d8d54f47c7c52e289d9d8c549220
This avoids attempting to allocate 0 bytes if the call fails. (An
additional byte is added to the result to allow a '\0' to be appended.)
Bug: chromium:334120888
Change-Id: Ifcb8ff7744c567cbd08051aa04cc66acf936078d
After the png_read_update_info() call, call png_get_channels() to find
out if the image has alpha.
Change-Id: I6fa709418744b4de90d10ff96eaeefe454ffa290
This simplifies integration with the Android platform and avoids the
files from being used when a non-NDK build is performed. In that case
Android.bp is preferred.
Change-Id: I6e334cf8b05a19da8452405f5f448f9e4b6e4a40
WebPPictureImportRGB() can fail on memory allocation. In this case,
jpeg_destroy_decompress() was already called, so do not go to Error.
Free metadata as an error is returned.
Change-Id: I045b072090e9063d3ad10369ad18b0f08bdffe9f
When transparency is present, it's not enough to just write 32bpp samples.
One need to use the full BITMAPV3INFOHEADER syntax and specify the
masks for BGRA.
see https://en.wikipedia.org/wiki/BMP_file_format#Pixel_storage
Also remove the height-flip trick and write samples bottom-to-top instead.
Change-Id: If5d92c11453b96764b5bfbf19e9678e632bc911f
- prefer https
- metadataworkinggroup.org/com seem to be offline; the web archive link
was obtained from exiftool: https://exiftool.org/TagNames/MWG.html
- fix kramdown link, rubyforge has been gone a long time
- fix png/zlib links
Bug: webp:544
Bug: b/202302177
Change-Id: Id69de4553e7baf00393f12a2c1acb262443a1a93
the container check may not be strictly necessary now that the alpha
check has matured and the library will detect usable alpha, but it's
safer to fix this case first before making larger changes.
Bug: webp:533
Change-Id: I2e1ba42156970d579a52bd183707a037e65fd900
replace with more inclusive terms or remove the comment entirely if the
meaning was already clear.
Bug: webp:507
Change-Id: Ica3bbf751ebf79f6668df6e6209af770248ff4ca
ICC extraction via GetColorContexts may fail due to the operation not
being supported with e.g., bitmaps.
Bug: webp:506
Change-Id: I587220e688ac90d77c84af21c9e7bc8bf178f3aa
Some PNG input contain chunks larger than libpng's default
memory-alloc limit (8M).
Raise this limit reasonably if it looks like the input bitstream
is larger than libpng's default limit.
BUG=webp:497
Change-Id: I2c9fbed727424042444b82cbf15e0781cefb38dc
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
after:
bc5092b1 pngdec: set memory functions
png_alloc_size_t was added in 1.4 use png_size_t in earlier versions
Change-Id: If65ac1c501e2d497b1be480095bf21f06ea7026a
use png_create_read_struct_2 to set a malloc function allowing the code
to fail on large allocations while fuzzing
Change-Id: Iaca1b93ecc6570067708f3ae2db07fbca74386ee
this quiets a -Wclobbered warning on const has_alpha under gcc-7 and
brings the variables closer to their first use.
Change-Id: I8a24f275b7ff34a94d47b576bcf276dbedac2121
Apply gamma correction to the decoded RGB values.
This handles corner cases where the PNG file doesn't have
a standard 1/2.2 gamma value.
BUG=webp:369
Change-Id: I9907b6e2c458002de7c26d0b9e416278cca33990
if a single text file name is supplied as argument
(e.g.: 'webpmux my_long_list_of_frames.txt'), the command
line arguments are actually parsed from this file.
Tokenizer will remove space, tabs, LF, CR, returns, etc.
+ changed ImgIoUtilReadFile() to return a null-terminated
data, for convenience.
+ misc clean-up in the code
BUG=webp:355
Change-Id: I76796305641d660933de5881763d723006712fa9
---
...prior to allocating a Picture. this is consistent with the other
readers and allows the allocation size to be limited at compile time
BUG=webp:355
Change-Id: Ib8e027ef863489b1e0f9e2a1403c3836da3ef48d
WEBP_MAX_IMAGE_SIZE can be defined to control this limit.
Set it to 1.5GiB w/--config=asan-fuzzer to avoid OOM with large resolution
images. This limit leaves some headroom over the single image max of 2^14 *
2^14 * 4
BUG=webp:355
Change-Id: I4d48eb0a063638297a842582e0229dfd5a54df5f