mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-19 20:08:28 +01:00
img2webp: add -exact/-noexact per-frame options
Bug: b:363409354 Change-Id: I4e7282ed2df091dbef6d79743be1c8c868c0d44a
This commit is contained in:
parent
1c8eba978b
commit
57883c78ed
@ -325,6 +325,9 @@ Per-frame options (only used for subsequent images input):
|
|||||||
-lossy ............... use lossy mode
|
-lossy ............... use lossy mode
|
||||||
-q <float> ........... quality
|
-q <float> ........... quality
|
||||||
-m <int> ............. method to use
|
-m <int> ............. method to use
|
||||||
|
-exact, -noexact ..... preserve or alter RGB values in transparent area
|
||||||
|
(default: -noexact, may cause artifacts
|
||||||
|
with lossy animations)
|
||||||
```
|
```
|
||||||
|
|
||||||
example: `img2webp -loop 2 in0.png -lossy in1.jpg -d 80 in2.tiff -o out.webp`
|
example: `img2webp -loop 2 in0.png -lossy in1.jpg -d 80 in2.tiff -o out.webp`
|
||||||
|
@ -63,6 +63,10 @@ static void Help(void) {
|
|||||||
printf(" -lossy ............... use lossy mode\n");
|
printf(" -lossy ............... use lossy mode\n");
|
||||||
printf(" -q <float> ........... quality\n");
|
printf(" -q <float> ........... quality\n");
|
||||||
printf(" -m <int> ............. method to use\n");
|
printf(" -m <int> ............. method to use\n");
|
||||||
|
printf(" -exact, -noexact ..... preserve or alter RGB values in transparent "
|
||||||
|
"area\n"
|
||||||
|
" (default: -noexact, may cause artifacts\n"
|
||||||
|
" with lossy animations)\n");
|
||||||
|
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf("example: img2webp -loop 2 in0.png -lossy in1.jpg\n"
|
printf("example: img2webp -loop 2 in0.png -lossy in1.jpg\n"
|
||||||
@ -248,6 +252,10 @@ int main(int argc, const char* argv[]) {
|
|||||||
fprintf(stderr, "Invalid negative duration (%d)\n", duration);
|
fprintf(stderr, "Invalid negative duration (%d)\n", duration);
|
||||||
parse_error = 1;
|
parse_error = 1;
|
||||||
}
|
}
|
||||||
|
} else if (!strcmp(argv[c], "-exact")) {
|
||||||
|
config.exact = 1;
|
||||||
|
} else if (!strcmp(argv[c], "-noexact")) {
|
||||||
|
config.exact = 0;
|
||||||
} else {
|
} else {
|
||||||
parse_error = 1; // shouldn't be here.
|
parse_error = 1; // shouldn't be here.
|
||||||
fprintf(stderr, "Unknown option [%s]\n", argv[c]);
|
fprintf(stderr, "Unknown option [%s]\n", argv[c]);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.\" Hey, EMACS: -*- nroff -*-
|
.\" Hey, EMACS: -*- nroff -*-
|
||||||
.TH IMG2WEBP 1 "July 18, 2024"
|
.TH IMG2WEBP 1 "September 3, 2024"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
img2webp \- create animated WebP file from a sequence of input images.
|
img2webp \- create animated WebP file from a sequence of input images.
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -88,6 +88,11 @@ Specify the compression factor between 0 and 100. The default is 75.
|
|||||||
Specify the compression method to use. This parameter controls the
|
Specify the compression method to use. This parameter controls the
|
||||||
trade off between encoding speed and the compressed file size and quality.
|
trade off between encoding speed and the compressed file size and quality.
|
||||||
Possible values range from 0 to 6. Default value is 4.
|
Possible values range from 0 to 6. Default value is 4.
|
||||||
|
.TP
|
||||||
|
.B \-exact, \-noexact
|
||||||
|
Preserve or alter RGB values in transparent area. The default is
|
||||||
|
\fB-noexact\fP, to help compressibility. Note \fB\-noexact\fP may cause
|
||||||
|
artifacts in frames compressed with \fB\-lossy\fP.
|
||||||
|
|
||||||
.SH EXIT STATUS
|
.SH EXIT STATUS
|
||||||
If there were no problems during execution, \fBimg2webp\fP exits with the value
|
If there were no problems during execution, \fBimg2webp\fP exits with the value
|
||||||
|
Loading…
Reference in New Issue
Block a user