Previous IDL Reference Guide: Graphics Object Classes Next

IDLgrMPEG

Superclasses | Properties | Creation | Methods | Examples | Version History

An IDLgrMPEG object creates an MPEG movie file from an array of image frames.


Note
The MPEG standard does not allow movies with odd numbers of pixels to be created.


Note
MPEG support in IDL requires a special license. For more information, contact your ITT Visual Information Solutions sales representative or technical support.


Note
The IDLffMJPEG2000 object creates and reads Motion JPEG2000 (MJ2) files, and provides more functionality than the MPEG_* routines. Animations can consist of monochrome, RGB or multi-component frames that display individual components, tiles or regions. See Overview of Motion JPEG2000 for more information.

Superclasses

IDLitComponent

Creation

See IDLgrMPEG::Init.

Properties

Objects of this class have the following properties. See IDLgrMPEG Properties for details on individual properties.

In addition, objects of this class inherit the properties of all superclasses of this class.

Methods

This class has the following methods:

In addition, this class inherits the methods of its superclasses (if any).

Examples

If you have a series of image objects (or simple image arrays), you can combine them into a single MPEG file using the IDLgrMPEG object. Suppose you have an array image array containing IDLgrImage objects that represent a time-series. You could use the following commands to create an MPEG file from the images.

First, create an MPEG object, and populate the file with frames from the imagearray array:

myMPEG = OBJ_NEW('IDLgrMPEG', FILENAME='mympeg.mpg')  
FOR image = 0, N_ELEMENTS(imagearray) DO BEGIN  
   myMPEG->Put, imagearray[image], image  
ENDFOR  
; Save the MPEG file:  
myMPEG->Save  

 


Note
Note that imagearray can contain either IDLgrImage objects or simple two-dimensional image arrays. All of the arrays or image objects must have the same dimensions.

Version History

5.1
Introduced

  IDL Online Help (March 06, 2007)