mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 14:34:33 +02:00
add -near_lossless [0..100] experimental option
This compresses the uimage using lossless compression and controlable decimating pre-process. Code is under WEBP_EXPERIMENTAL_FEATURE while it's being experimented with. Change-Id: I8b7f4cfcc3c6afc52a556102842bdbb045ed5ee8
This commit is contained in:
@ -612,6 +612,10 @@ static void HelpLong(void) {
|
||||
" green=0xe0 and blue=0xd0\n");
|
||||
printf(" -noalpha ............... discard any transparency information\n");
|
||||
printf(" -lossless .............. encode image losslessly\n");
|
||||
#ifdef WEBP_EXPERIMENTAL_FEATURES
|
||||
printf(" -near_lossless ......... use near-lossless image\n"
|
||||
" preprocessing (0=off..100)\n");
|
||||
#endif
|
||||
printf(" -hint <string> ......... specify image characteristics hint,\n");
|
||||
printf(" one of: photo, picture or graph\n");
|
||||
|
||||
@ -765,6 +769,9 @@ int main(int argc, const char *argv[]) {
|
||||
keep_alpha = 0;
|
||||
} else if (!strcmp(argv[c], "-lossless")) {
|
||||
config.lossless = 1;
|
||||
} else if (!strcmp(argv[c], "-near_lossless") && c < argc - 1) {
|
||||
config.near_lossless = strtol(argv[++c], NULL, 0);
|
||||
config.lossless = 1; // use near-lossless only with lossless
|
||||
} else if (!strcmp(argv[c], "-hint") && c < argc - 1) {
|
||||
++c;
|
||||
if (!strcmp(argv[c], "photo")) {
|
||||
|
Reference in New Issue
Block a user