Pascal Massimino
6cf504d018
PNM decoding: handle max_value != 255
...
also add support for PAM's GRAYSCALE_ALPHA tuple (with depth = 2)
BUG=webp:449
Change-Id: I0fe4825cd1d5487b9f7af332c7d3d56c1b35c3fb
2020-01-06 23:48:40 +01:00
Yannis Guyon
17850e74ce
libwebp: Remove char-subscripts warning in pnmdec.c
...
Change-Id: I7a771e17fca0ba8a49a816b48cc477ad7a03a435
2019-10-16 17:58:30 +02:00
Yannis Guyon
24d2ccb4e0
webp: Fix imageio ReadPNM() TUPLTYPE
...
It was colliding with "DEPTH" header value so ignoring "TUPLTYPE"
except for unhandled types.
Change-Id: I3c69cb6a81c5369e64b59d50567cd7fbc1756d57
2019-07-30 09:22:29 +02:00
skal
fc09e6e252
PNM decoder: prevent unsupported depth=2 PAM case.
...
Change-Id: I8476818908d71498dd80b07dc255aa008ffd16f5
2018-02-07 18:24:01 -08:00
James Zern
20a94186ce
pnmdec,PAM: validate depth before calculating bytes_per_px
...
fixes potential integer overflow with corrupt files.
Change-Id: I03e27fb14ad559dcd47e2704afdb6be9a163e02e
2017-08-19 13:56:06 -07:00
Vincent Rabaud
d78ff78095
Merge "Fix code to compile with C++."
2017-05-15 15:11:11 +00:00
Vincent Rabaud
c8f14093ac
Fix code to compile with C++.
...
Change-Id: I324236440cb853cb3c8fb278ef22449cd9772ad7
2017-05-15 16:22:03 +02:00
James Zern
497dc6a70d
pnmdec: sanitize invalid header output
...
Change-Id: I034cb00047f725e1cd106d3677db567f1efa0847
2017-05-15 04:57:45 -07:00
James Zern
645f0c53de
pnmdec,PAM: set bytes_per_px based on depth when missing
...
this avoids setting bytes_per_px < depth causing an undersized
allocation for rgb import resulting in a crash.
BUG=b/37930872
Change-Id: I32a86f91528acc084a53d08c9fde9f2f1270a603
2017-05-10 19:15:50 -04:00
Pascal Massimino
17e3c11f99
Add limited PAM decoding support
...
Should support RGB / RGB_ALPHA / GRAYSCALE correctly, though
Change-Id: Idb1470581ebdfc6efee73009b2abd53889e901cb
2017-03-03 11:19:48 +01:00
Pascal Massimino
1e7ad88b85
PNM header decoder: add some basic numerical validation
...
see spec: http://netpbm.sourceforge.net/doc/ppm.html
Change-Id: I55e01f8cec79f9124e72d5f3d05be4ad0deae315
2017-02-01 15:03:11 +01:00
Pascal Massimino
dcf9d82a95
imageio: add limited PNM support for reading
...
see: http://netpbm.sourceforge.net/
Only reads P5 and P6 pnm files for now.
Change-Id: I2332a623f803df67455047f570f1cff9f464480a
2017-02-01 07:41:56 +00:00