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

@ -620,6 +620,7 @@ static void HelpLong(void) {
printf(" -af .................... auto-adjust filter strength\n");
printf(" -pre <int> ............. pre-processing filter\n");
printf("\n");
printf("Supported input formats:\n %s\n", WebPGetEnabledInputFileFormats());
}
//------------------------------------------------------------------------------

View File

@ -65,6 +65,8 @@ static void Help(void) {
"arguments will be\n");
printf("tokenized from this file. The file name must not start with "
"the character '-'.\n");
printf("\nSupported input formats:\n %s\n",
WebPGetEnabledInputFileFormats());
}
//------------------------------------------------------------------------------
@ -186,7 +188,7 @@ int main(int argc, const char* argv[]) {
verbose = 1;
} else if (!strcmp(argv[c], "-h") || !strcmp(argv[c], "-help")) {
Help();
goto End;
FREE_WARGV_AND_RETURN(0);
} else if (!strcmp(argv[c], "-version")) {
const int enc_version = WebPGetEncoderVersion();
const int mux_version = WebPGetMuxVersion();