Animated GIF Images in MIRCdocuments
Animated GIF images may display unexpected behavior in a MIRCdocument. This article describes the behavior, the reason, and a possible work-around.
Animated GIF images which are wider than the allocated space in the display format do not play within the MIRCdocument.
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.
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:
- Create a MIRCdocument using one of the MSTF templates in the Advanced Authoring Tool.
- Click the + icon at the left side of the toolbar to expose the technical parameters for the sections.
- Click the Images section and enter a value larger than the image width in the "Pane width" field.
- Select the animated GIF in the file cabinet pane on the right side of the window.
- Click the button inserting the image.
- 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.