image_dec: add WebPGetEnabledInputFileFormats()

and use it to output the types supported in the examples

Change-Id: Ia6b8624a2146cf72c679129065a72f215644e1e9
This commit is contained in:
James Zern
2022-03-26 15:17:58 -07:00
parent 7a68afaac5
commit 617cf03656
5 changed files with 27 additions and 2 deletions

View File

@ -41,6 +41,9 @@ typedef enum {
WEBP_UNSUPPORTED_FORMAT
} WebPInputFileFormat;
// Returns a comma separated list of enabled input formats.
const char* WebPGetEnabledInputFileFormats(void);
// Try to infer the image format. 'data_size' should be larger than 12.
// Returns WEBP_UNSUPPORTED_FORMAT if format can't be guess safely.
WebPInputFileFormat WebPGuessImageType(const uint8_t* const data,