Commit Graph

13 Commits

Author SHA1 Message Date
James Zern
cec7201447 jpegdec: correct ContextFill signature
fill_input_buffer returns a boolean

Change-Id: I208a1a862fa6c57cb5b73568b84055f734c1c36f
2016-12-09 18:20:25 -08:00
Pascal Massimino
f7601aa686 Merge "Introduce a generic WebPGetImageReader(type) function" 2016-10-13 07:21:59 +00:00
Pascal Massimino
ce8733209d Introduce a generic WebPGetImageReader(type) function
Also introduce an always-failing 'reader' for unknown formats.
So we don't have to check reader==NULL, code is more regular.

-> We can get read of specific ReadPNG(), ReadJPEG(), ... declaration and use.

Change-Id: I290759705420878f00c7223c726d4ad404afd9c4
2016-10-12 21:00:27 -07:00
James Zern
2a2773ea29 imageio/*dec,Read*: add input parameter checks
Change-Id: I5e069d6ea4da9d8c71be03ef99aad679dd1aad21
2016-10-12 20:49:30 -07:00
James Zern
bc86b7a8a1 imageio_util: add ImgIoUtilCheckSizeArgumentsOverflow
and use it to validate decoder allocations. fixes a crash in jpegdec at
least.

BUG=webp:312

Change-Id: Ia940590098f29510add6aad10a8dfe9e9ea46bf4
2016-10-07 14:41:48 -07:00
James Zern
41cab7fe0f imageio/Android.mk: correct imagedec dependencies
this relies on imageio_util; remove the reference for dwebp as this does
not directly rely on it.

Change-Id: I09b863ae0dfe2e9c4929ff6b77e9310bb870ce35
2016-09-08 20:03:07 -07:00
Pascal Massimino
af1ad3e2dd libimageenc.a: extract image-saving code from dwebp
BUG=webp:277
Change-Id: I2c0e1df7b13b1f77474b5478048fef022e90f77a
2016-09-08 19:11:26 -07:00
James Zern
ebee57f4d1 move imageio/example_util.[hc] (back to) examples/
decoding and file i/o have been split to imageio, all that remains is
some string routines used for parameter parsing in the examples

Change-Id: I77386cd8aa39124b9e14c95fdbaa17ea4ab5bb24
2016-07-21 20:41:03 -07:00
James Zern
99542bbf3e webpdec: s/ExUtil//
PrintWebPError, LoadWebP, DecodeWebP, DecodeWebPIncremental

Change-Id: Ie17578b91c7efdf6e5fe63568a95f79788b7f8ee
2016-07-21 20:40:11 -07:00
James Zern
da573cf490 imageio_util: s/ExUtil/ImgIoUtil/
ExUtil(SetBinaryMode|ReadFile|ReadFromStdin|WriteFile|CopyPlane) ->
ImgIoUtil(SetBinaryMode|ReadFile|ReadFromStdin|WriteFile|CopyPlane)

Change-Id: I5497f8fe514347efeb83b8b8866ef334390fc18e
2016-07-21 20:40:11 -07:00
James Zern
bdda5bd4bf split example_util.h
move ExUtil*File to imageio_util.h
ExUtil*WebP* to webpdec.h

string parsing routines remain

Change-Id: I0560c4a74e86710d83bc4b5b234f1b5ef9a86f9d
2016-07-21 19:14:58 -07:00
James Zern
4cecab63bd pngdec.c,jpegdec.[hc]: remove unnecessary includes
example_util.h hasn't been needed since:
a9947c3 cwebp: add support for stdin input

Change-Id: Ic4fcefd5567aa3f4a5c1d443e8c6d9b4fc2fb53f
2016-07-20 12:12:14 -07:00
James Zern
c379b55a93 move examples/{example_util,image_dec} to imageio/
Change-Id: I2508c786a095a2a75bebf766210c64e2af88f9b6
2016-07-19 19:06:29 -07:00