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 (Using IDL) for more information.
Superclasses
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.
PRO mpeg_example loops = 4 increment = 32 pulseLength = 100 ;waitSeconds = .01 ; Put the .MPG file into the system's /TMP directory filename = filepath('mpeg_example.mpg', /TMP) myDevice = !D.NAME SET_PLOT, 'z' DEVICE, SET_RESOLUTION=[500,400] mpegObj = OBJ_NEW('IDLgrMPEG') FOR i = 0, increment*loops DO BEGIN x = 2*!PI/pulseLength * INDGEN(100) + ( i MOD increment ) PLOT, x, SIN(x), XRANGE=[0,increment], XSTYLE=1, $ YRANGE=[-!PI/3, !PI/3] mpegObj->Put, TVRD(/ORDER) ;WAIT, waitSeconds ENDFOR mpegObj -> Save, FILENAME=filename SET_PLOT, myDevice PRINT, 'Done writing MPEG file ' + filename END
Version History