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 GIF and PNG.
  • 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
    Video[]a video 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:
  • AnimationRepetitions Infinityhow many times to run before stopping
    AnimationRunning Truewhether the animation is running
    DefaultDuration Automaticthe default duration in seconds
    FrameRate Automaticthe rate at which images are displayed
    ImageSizeInheritedthe overall image size to use
    RasterSizeAutomaticdimensions of image frames
    RefreshRate Automaticthe 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  (3)

Display a list of images as an animation:

Create an animated image from a list of numbers:

Create an animated image from a list of images:

Scope  (7)

Data  (4)

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:

Create an animated image from a video:

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  (6)

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  (2)

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

When creating an animated image from videos longer than 5 seconds, animation is made from a snippets video:

Compare to the original duration:

FrameRate  (1)

Use FrameRaten to display up to n frames per second:

RefreshRate  (1)

Use RefreshRaten 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 (updated 2021).

Text

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

CMS

Wolfram Language. 2020. "AnimatedImage." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. 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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_animatedimage, organization={Wolfram Research}, title={AnimatedImage}, year={2021}, url={https://reference.wolfram.com/language/ref/AnimatedImage.html}, note=[Accessed: 08-October-2024 ]}