Skip to main content

AnimatedImage

Represents a collection of Image merged into an animation

AnimatedImage[{__Image}, opts___]
AnimatedImage[File[_String], opts___]

Options

FrameRate

By the default is 12

Constructor

From GIF animation

Import .gif as usual and supply to AnimatedImage as a list

AnimatedImage[File["yourGif.gif"], FrameRate->24]

From images

Generate raster images

t = Table[
With[{h = h}, LinearGradientImage[Hue[# + h, .5] &, 50]], {h, 0,
1, .1}];

AnimatedImage[t, FrameRate->24]

or from imported GIF

AnimatedImage[Import["anim.gif"], FrameRate->30]

Another example

AnimatedImage[Rasterize[Style[#, 40]] & /@ Range[0, 9], 
FrameRate -> 6]

From Animate

You can wrap Animate, AnimatePlot, AnimateParametericPlot expressions with AnimatedImage to rasterize them into the series of images:

AnimatedImage[AnimatePlot[Sinc[x z], {x,0,4Pi}, {z,1,5}], FrameRate->60]

where it is extended with options alike Rasterize

Options

  • FrameRate playback speed (does not affect rasterization)
  • "Window" by the default is CurrentWindow
  • "ExposureTime" sets waiting time before each frame is captured. By the default it is Automatic and the actual values is taken from the animation rate of the widget
  • "Asynchronous" sets async rasterization mode, where the constructor returns Promise immediately. By the default is False.

Exporting

You can export AnimatedImage as GIF using file, ByteArray or a string as a container:

Export["anim.gif", AnimatedImage[...]]
ExportByteArray[AnimatedImage[...], "GIF"]
ExportString[AnimatedImage[...], {"Base64", "GIF"}]

Also Video object can be directly derived from AnimatedImage:

Video[AnimatedImage[...]]

Output forms