Playing an Animation
When you play an animation, you display a sequence of images from a list of bitmaps. This list of bitmaps can be in a multipage file that plays as it loads, or they can be already loaded in a control. For an explanation of bitmap lists, refer to Bitmaps and Bitmap Lists.
To execute a playback, LEADTOOLS creates a temporary target bitmap, renders the listed bitmaps to the target, and displays the target bitmap. An animated GIF file can specify properties of this target bitmap. With images from other sources, LEADTOOLS uses default values that are based on bitmaps in the list.
Before playing an animation from a file, you can use the GetFileInfo method to find out whether the file is an animated file and to find out the height and width of the target bitmap. The GetFileInfo method updates the following properties that contain this information:
To determine how a particular bitmap in a list behaves during playback, you can get and set the following properties:
BitmapEnableTransparency property
BitmapTransparentColor property
To determine how a particular bitmap in a list is positioned relative to the temporary target bitmap, you can get and set the following properties:
You can get and set the following properties of the temporary target bitmap:
AnimationBitsPerPixel property
Use the following properties to control the playback execution:
Use the following event to add code that executes when an animation playback starts or stops: