public class TimeInterval extends Object
Represents the time interval in milliseconds
Export of part of animation from GIF image based on time interval.
try (Image image = Image.load("Animation.gif")) { GifOptions options = new GifOptions(); options.setFullFrame(true); final MultiPageOptions multiPageOptions = new MultiPageOptions(); multiPageOptions.setMode(MultiPageMode.TimeInterval); multiPageOptions.setTimeInterval(new TimeInterval(0, 400)); options.setMultiPageOptions(multiPageOptions); image.save("PartOfAnimation.gif", options); }
Constructor and Description |
---|
TimeInterval(long from,
long to)
Initializes a new instance of the
TimeInterval class. |
Modifier and Type | Method and Description |
---|---|
long |
getFrom()
Gets From milliseconds.
|
long |
getTo()
Gets To milliseconds.
|
void |
setFrom(long value)
Sets From milliseconds.
|
void |
setTo(long value)
Sets To milliseconds.
|
public TimeInterval(long from, long to)
Initializes a new instance of the TimeInterval
class.
from
- From milliseconds.to
- To milliseconds.