mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 06:24:27 +02:00
GetVersion() methods for mux and demux
Also use the same in example binaries. Change-Id: Id4bb4c4231a6b8fe9ed4370a6f46567c52a04a17
This commit is contained in:
@ -49,6 +49,7 @@
|
||||
Misc:
|
||||
webpmux -info in.webp
|
||||
webpmux [ -h | -help ]
|
||||
webpmux -version
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
@ -277,6 +278,7 @@ static void PrintHelp(void) {
|
||||
printf(" [-bgcolor BACKGROUND_COLOR] -o OUTPUT\n");
|
||||
printf(" webpmux -info INPUT\n");
|
||||
printf(" webpmux [-h|-help]\n");
|
||||
printf(" webpmux -version\n");
|
||||
|
||||
printf("\n");
|
||||
printf("GET_OPTIONS:\n");
|
||||
@ -628,6 +630,12 @@ static int ParseCommandLine(int argc, const char* argv[],
|
||||
PrintHelp();
|
||||
DeleteConfig(config);
|
||||
exit(0);
|
||||
} else if (!strcmp(argv[i], "-version")) {
|
||||
const int version = WebPGetMuxVersion();
|
||||
printf("%d.%d.%d\n",
|
||||
(version >> 16) & 0xff, (version >> 8) & 0xff, version & 0xff);
|
||||
DeleteConfig(config);
|
||||
exit(0);
|
||||
} else {
|
||||
ERROR_GOTO2("ERROR: Unknown option: '%s'.\n", argv[i], ErrParse);
|
||||
}
|
||||
|
Reference in New Issue
Block a user