add a "-duration duration,start,end" option to webpmux

this will force a constant duration for an interval of frames
in an animation.
Notes:
 a) '-duration [...]' can be repeated as many times as needed.
 b) intervals are taken into account in option order. If they overlap, values will be overwritten.
 c) 'start' and 'end' can be omitted, but not the duration value.
 d) 'end' can be equal to '0', in which case it means 'last frame'
 e) single-image files are untouched (ie. not turned into an animation file).

Some example usage:
    webpmux -duration 150 in.webp -o out.webp
    webpmux -duration 33,10,0 in.webp -o out.webp
    webpmux -duration 200,2 -duration 150,0,50 in.webp -o out.webp

Change-Id: I9b595dafa77f9221bacd080be7858b1457f54636
This commit is contained in:
Pascal Massimino
2016-10-21 06:14:45 -07:00
parent 31b1e34342
commit 3f182d36f4
5 changed files with 209 additions and 3 deletions

View File

@ -1,5 +1,5 @@
.\" Hey, EMACS: -*- nroff -*-
.TH WEBPMUX 1 "June 23, 2016"
.TH WEBPMUX 1 "November 8, 2016"
.SH NAME
webpmux \- create animated WebP files from non\-animated WebP images, extract
frames from animated WebP images, and manage XMP/EXIF metadata and ICC profile.
@ -35,6 +35,13 @@ frames from animated WebP images, and manage XMP/EXIF metadata and ICC profile.
.I OUTPUT
.RE
.br
.B webpmux \-duration
.I DURATION OPTIONS
.B [ \-duration ... ]
.I INPUT
.B \-o
.I OUTPUT
.br
.B webpmux \-info
.I INPUT
.br
@ -91,6 +98,20 @@ Strip EXIF metadata.
.B xmp
Strip XMP metadata.
.SS DURATION_OPTIONS (\-duration)
Amend the duration of a specific interval of frames.
.TP
.I duration[,start[,end]]
Where:
'duration' is the duration for the interval (mandatory). Must be non-negative.
'start' is the starting frame index of the interval (optional). If 'start'
is less or equal to '1', its value will be set to '1'.
'end' is the ending frame index (inclusive) of the interval (optional). The
value '0' has the special meaning 'last frame of the animation'.
Note that the frames outside of the [start, end] interval will remain untouched.
.I Reminder: frame indexing starts at '1'.
.br
.SS FRAME_OPTIONS (\-frame)
Create an animated WebP file from multiple (non\-animated) WebP images.
.TP