After the png_read_update_info() call, call png_get_channels() to find
out if the image has alpha.
Change-Id: I6fa709418744b4de90d10ff96eaeefe454ffa290
- 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
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
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
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