Animated GIF Images in MIRCdocuments

From MircWiki
Revision as of 14:01, 18 February 2007 by Johnperry (talk | contribs)
Jump to navigation Jump to search

Animated GIF images may display unexpected behavior in a MIRCdocument. This article describes the behavior, the reason, and a possible work-around.

The Behavior:

Animated GIF images which are wider than the allocated space in the display format do not play within the MIRCdocument.

The Reason:
When the author service inserts an image into a MIRCdocument, it compares the width of the image to the space that is allocated for it in the display format. If the image width is less than or equal to the pane width, it uses the original image as the one that is displayed. If the image width is greater than the pane width, it creates a JPEG image with a width equal to the pane width and uses that as the base image to be displayed within the MIRCdocument and links to the original image, loading it in a separate window when the user selects it.

The motivation for this approach is to minimize the amount of time it takes to download the images necessary to allow the user to browse within the MIRCdocument.

An unintended consequence of this approach is that if the original image is an animated GIF which is wider than the allocated space, the base image used is a JPEG, which is not animated, and selecting the original image then loads the GIF, which plays normally.

A Work-around:
The way to avoid the problem is to set the pane width of the display format larger than the width of the widest animated GIF. The pane width is a technical parameter which can be exposed by clicking the + tool in the toolbar. This must be done before the animated GIF images are added to the document. Here is a list of steps:

  1. Create a MIRCdocument using one of the MSTF templates in the Advanced Authoring Tool.
  2. Click the + icon at the left side of the toolbar to expose the technical parameters for the sections.
  3. Click the Images section and enter a value larger than the image width in the "Pane width" field.
  4. Select the animated GIF in the file cabinet pane on the right side of the window.
  5. Click the button inserting the image.
  6. Save the document.

When the document is viewed, the animated GIF will play correctly within the MIRCdocument.

The same situation can occur when an animated GIF is added to a normal document section. In that case, the work-around is to set the "Maximum image width" technical parameter in the section to a value larger than the width of the animated GIF.