AnimatedImage

AnimatedImage[{image1,image2,}]

generates an animation whose frames are the successive imagei.

AnimatedImage[file]

represents an animated image from file.

Details and Options

  • AnimatedImage can be used to display a list of images as a dynamic animation. Animated images are typically stored in formats such as PNG and GIF.
  • In AnimatedImage[file], file can be any of the following:
  • File["file"] or "file"file name, searched for on $Path
    URL["url"] or "url"HTTP, HTTPS or FTP URL
    CloudObject[]a cloud object
    LocalObject[]a local object
  • The syntax AnimatedImage[][prop] can be used to extract specific properties.
  • The following properties are supported:
  • "AnimationRepetitions"number of times to repeat the animation
    "Channels"number of image channels
    "ColorSpace"the color space to assume for data
    "DataType"underlying data type
    "FrameRate"frame rate to use
    "ImageCount"number of images
    "ImageList"all images
    "Interleaving"whether data is stored interleaved
    "RasterSize"pixel dimensions of images
    "TotalDuration"the total duration
    "Transparency"whether the image has transparency (alpha) channel
  • The following options can be specified:
  • AnimationRepetitionsInfinityhow many times to run before stopping
    AnimationRunningTruewhether the animation is running
    DefaultDurationAutomaticthe default duration in seconds
    FrameRate24the rate at which images are displayed
    ImageSizeAllthe overall image size to use
    RefreshRateAutomaticthe default number of times per second to refresh
  • Information for AnimatedImage includes the following properties:
  • "AnimationRepetitions"number of times to repeat the animation
    "Channels"number of image channels
    "ColorSpace"the color space to assume for data
    "DataType"underlying data type
    "FrameRate"frame rate to use
    "ImageCount"number of images
    "ImageDimensions"pixel dimensions
    "Interleaving"whether data is stored interleaved
    "RasterSize"pixel dimensions of images
    "TotalDuration"the total duration
    "Transparency"whether the image has transparency (alpha) channel
  • Basic image editing functions that support AnimatedImage are: ColorConvert, ImageCrop, ImagePad, ImageReflect, ImageResize, ImageRotate, ImageTake and ImageTrim.
  • Use Video and ListAnimate to convert an animated image to the corresponding objects.

Examples

open allclose all

Basic Examples  (2)

Display a list of images as a continuous animation:

Create an animated image from a list of images:

Scope  (6)

Data  (3)

Animate a list of images:

Animate frames of a file:

Animate a list of images imported from a file:

Notice that some metadata such as frame durations is not used to create the animated image:

Properties  (3)

Extract the list of images:

Extract the frame rate:

Extract the total duration of the animation:

The value is influenced by some option settings:

Options  (5)

AnimationRepetitions  (1)

Use AnimationRepetitionsn to play the animation n times only:

Use AnimationRepetitions to continuously play the animation:

AnimationRunning  (1)

Use AnimationRunning to specify whether the animation is running by default:

DefaultDuration  (1)

Use DefaultDurations to control the time duration of one animation cycle:

FrameRate  (1)

Use FrameRate->n to display up to n frames per second:

RefreshRate  (1)

Use RefreshRate->n to refresh an animation up to n times per second:

Applications  (2)

Build an animation:

Negate frames of an animated image:

Properties & Relations  (4)

Perform structural image operations directly on AnimatedImage:

Pad all the frames:

Resize all the frames:

Use ListAnimate to display animation controls:

Use Video to convert the animation to a video object:

Use Information to visualize information about an AnimatedImage object:

Extract a specific property:

Interactive Examples  (1)

Use a Manipulate to interactively control the animation settings:

Wolfram Research (2020), AnimatedImage, Wolfram Language function, https://reference.wolfram.com/language/ref/AnimatedImage.html.

Text

Wolfram Research (2020), AnimatedImage, Wolfram Language function, https://reference.wolfram.com/language/ref/AnimatedImage.html.

BibTeX

@misc{reference.wolfram_2021_animatedimage, author="Wolfram Research", title="{AnimatedImage}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/AnimatedImage.html}", note=[Accessed: 03-August-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_animatedimage, organization={Wolfram Research}, title={AnimatedImage}, year={2020}, url={https://reference.wolfram.com/language/ref/AnimatedImage.html}, note=[Accessed: 03-August-2021 ]}

CMS

Wolfram Language. 2020. "AnimatedImage." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AnimatedImage.html.

APA

Wolfram Language. (2020). AnimatedImage. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AnimatedImage.html