Apply CVE-2023-4863 patch
[platform/upstream/libwebp.git] / man / webpmux.1
1 .\"                                      Hey, EMACS: -*- nroff -*-
2 .TH WEBPMUX 1 "December 12, 2020"
3 .SH NAME
4 webpmux \- create animated WebP files from non\-animated WebP images, extract
5 frames from animated WebP images, and manage XMP/EXIF metadata and ICC profile.
6 .SH SYNOPSIS
7 .B webpmux \-get
8 .I GET_OPTIONS
9 .I INPUT
10 .B \-o
11 .I OUTPUT
12 .br
13 .B webpmux \-set
14 .I SET_OPTIONS
15 .I INPUT
16 .B \-o
17 .I OUTPUT
18 .br
19 .B webpmux \-strip
20 .I STRIP_OPTIONS
21 .I INPUT
22 .B \-o
23 .I OUTPUT
24 .br
25 .B webpmux \-frame
26 .I FRAME_OPTIONS
27 .B [ \-frame ... ] [ \-loop
28 .I LOOP_COUNT
29 .B ]
30 .br
31 .RS 8
32 .B [ \-bgcolor
33 .I BACKGROUND_COLOR
34 .B ] \-o
35 .I OUTPUT
36 .RE
37 .br
38 .B webpmux \-duration
39 .I DURATION OPTIONS
40 .B [ \-duration ... ]
41 .I INPUT
42 .B \-o
43 .I OUTPUT
44 .br
45 .B webpmux \-info
46 .I INPUT
47 .br
48 .B webpmux [\-h|\-help]
49 .br
50 .B webpmux \-version
51 .br
52 .B webpmux argument_file_name
53 .SH DESCRIPTION
54 This manual page documents the
55 .B webpmux
56 command.
57 .PP
58 \fBwebpmux\fP can be used to create/extract from animated WebP files, as well as
59 to add/extract/strip XMP/EXIF metadata and ICC profile.
60 If a single file name (not starting with the character '\-') is supplied as
61 the argument, the command line arguments are actually tokenized from this file.
62 This allows for easy scripting or using a large number of arguments.
63 .SH OPTIONS
64 .SS GET_OPTIONS (\-get):
65 .TP
66 .B icc
67 Get ICC profile.
68 .TP
69 .B exif
70 Get EXIF metadata.
71 .TP
72 .B xmp
73 Get XMP metadata.
74 .TP
75 .BI frame " n
76 Get nth frame from an animated image. (n = 0 has a special meaning: last frame).
77
78 .SS SET_OPTIONS (\-set)
79 .TP
80 .BI loop " loop_count
81 Set loop count on an animated file.
82 .P
83 Where: 'loop_count' must be in range [0, 65535].
84 .TP
85 .BI icc " file.icc
86 Set ICC profile.
87 .P
88 Where: 'file.icc' contains the ICC profile to be set.
89 .TP
90 .BI exif " file.exif
91 Set EXIF metadata.
92 .P
93 Where: 'file.exif' contains the EXIF metadata to be set.
94 .TP
95 .BI xmp " file.xmp
96 Set XMP metadata.
97 .P
98 Where: 'file.xmp' contains the XMP metadata to be set.
99
100 .SS STRIP_OPTIONS (\-strip)
101 .TP
102 .B icc
103 Strip ICC profile.
104 .TP
105 .B exif
106 Strip EXIF metadata.
107 .TP
108 .B xmp
109 Strip XMP metadata.
110
111 .SS DURATION_OPTIONS (\-duration)
112 Amend the duration of a specific interval of frames. This option is only
113 effective on animated WebP and has no effect on a single-frame file.
114 .TP
115 .I duration[,start[,end]]
116 Where:
117 .br
118 .B duration
119 is the duration for the interval in milliseconds (mandatory).
120 Must be non-negative.
121 .br
122 .B start
123 is the starting frame index of the interval (optional).
124 .br
125 .B end
126 is the ending frame index (inclusive) of the interval (optional).
127 .TP
128 The three typical usages of this option are:
129 .br
130 .B -duration d
131      set the duration to 'd' for the whole animation.
132 .br
133 .B -duration d,f
134      set the duration of frame 'f' to 'd'.
135 .br
136 .B -duration d,start,end
137      set the duration to 'd' for the whole [start,end] interval.
138 .TP
139 .P
140 Note that the frames outside of the [start, end] interval will remain untouched.
141 The 'end' value '0' has the special meaning 'last frame of the animation'.
142 .TP
143 .I Reminder:
144 frame indexing starts at '1'.
145 .br
146
147 .SS FRAME_OPTIONS (\-frame)
148 Create an animated WebP file from multiple (non\-animated) WebP images.
149 .TP
150 .I file_i +di[+xi+yi[+mi[bi]]]
151 Where: 'file_i' is the i'th frame (WebP format), 'xi','yi' specify the image
152 offset for this frame, 'di' is the pause duration before next frame, 'mi' is
153 the dispose method for this frame (0 for NONE or 1 for BACKGROUND) and 'bi' is
154 the blending method for this frame (+b for BLEND or \-b for NO_BLEND).
155 Argument 'bi' can be omitted and will default to +b (BLEND).
156 Also, 'mi' can be omitted if 'bi' is omitted and will default to 0 (NONE).
157 Finally, if 'mi' and 'bi' are omitted then 'xi' and 'yi' can be omitted and will
158 default to +0+0.
159 .TP
160 .BI \-loop " n
161 Loop the frames n number of times. 0 indicates the frames should loop forever.
162 Valid range is 0 to 65535 [Default: 0 (infinite)].
163 .TP
164 .BI \-bgcolor " A,R,G,B
165 Background color of the canvas.
166 .br
167 where: 'A', 'R', 'G' and 'B' are integers in the range 0 to 255 specifying the
168 Alpha, Red, Green and Blue component values respectively
169 [Default: 255,255,255,255].
170
171 .SS INPUT
172 .TP
173 Input file in WebP format.
174
175 .SS OUTPUT (\-o)
176 .TP
177 Output file in WebP format.
178
179 .SS Note:
180 .TP
181 The nature of EXIF, XMP and ICC data is not checked and is assumed to be valid.
182
183 .SH BUGS
184 Please report all bugs to the issue tracker:
185 https://bugs.chromium.org/p/webp
186 .br
187 Patches welcome! See this page to get started:
188 http://www.webmproject.org/code/contribute/submitting\-patches/
189
190 .SH EXAMPLES
191 .P
192 Add ICC profile:
193 .br
194 webpmux \-set icc image_profile.icc in.webp \-o icc_container.webp
195 .P
196 Extract ICC profile:
197 .br
198 webpmux \-get icc icc_container.webp \-o image_profile.icc
199 .P
200 Strip ICC profile:
201 .br
202 webpmux \-strip icc icc_container.webp \-o without_icc.webp
203 .P
204 Add XMP metadata:
205 .br
206 webpmux \-set xmp image_metadata.xmp in.webp \-o xmp_container.webp
207 .P
208 Extract XMP metadata:
209 .br
210 webpmux \-get xmp xmp_container.webp \-o image_metadata.xmp
211 .P
212 Strip XMP metadata:
213 .br
214 webpmux \-strip xmp xmp_container.webp \-o without_xmp.webp
215 .P
216 Add EXIF metadata:
217 .br
218 webpmux \-set exif image_metadata.exif in.webp \-o exif_container.webp
219 .P
220 Extract EXIF metadata:
221 .br
222 webpmux \-get exif exif_container.webp \-o image_metadata.exif
223 .P
224 Strip EXIF metadata:
225 .br
226 webpmux \-strip exif exif_container.webp \-o without_exif.webp
227 .P
228 Create an animated WebP file from 3 (non\-animated) WebP images:
229 .br
230 webpmux \-frame 1.webp +100 \-frame 2.webp +100+50+50
231 .br
232 .RS 8
233 \-frame 3.webp +100+50+50+1+b \-loop 10 \-bgcolor 255,255,255,255
234 .br
235 \-o anim_container.webp
236 .RE
237 .P
238 Get the 2nd frame from an animated WebP file:
239 .br
240 webpmux \-get frame 2 anim_container.webp \-o frame_2.webp
241 .P
242 Using \-get/\-set/\-strip with input file name starting with '\-':
243 .br
244 webpmux \-set icc image_profile.icc \-o icc_container.webp \-\- \-\-\-in.webp
245 .br
246 webpmux \-get icc \-o image_profile.icc \-\- \-\-\-icc_container.webp
247 .br
248 webpmux \-strip icc \-o without_icc.webp \-\- \-\-\-icc_container.webp
249
250 .SH AUTHORS
251 \fBwebpmux\fP is a part of libwebp and was written by the WebP team.
252 .br
253 The latest source tree is available at
254 https://chromium.googlesource.com/webm/libwebp
255 .PP
256 This manual page was written by Vikas Arora <vikaas.arora@gmail.com>,
257 for the Debian project (and may be used by others).
258
259 .SH SEE ALSO
260 .BR cwebp (1),
261 .BR dwebp (1),
262 .BR gif2webp (1)
263 .br
264 Please refer to http://developers.google.com/speed/webp/ for additional
265 information.