initCommon(); $template->displayHeader(); ?>

2.5. Using Document Image Files

Tutorial documents often make use of images such as .PNG files. Store image files in a figs/ folder in the main module directory, as shown in Example 2.1, “Example Module Structure”.

Depending on the output media, sometimes images may be scaled, streteched, or squashed. To minimize any distortions, we recommend that you use only .PNG images. Avoid .JPG files. The convert(1) program, from the ImageMagick RPM package, provides a convenient way to reformat .JPG images into .PNG format. For more information on formatting images such as screenshots, refer to Section 3.5, “Screenshots”.

Image files may be organized into subdirectories under figs/ if necessary. The document building system recreates the image subdirectory structure in the output documents.

Images often contain labels or other text which may need to be localized. A screenshot of a program, for example, may require a version for each translated language. Name language-dependent image files such as program screenshots by adding the language code to the filename, such as menu-en_US.png. Language-independent images, such as icon.png, do not need language codes.

Sometimes, a document may require images that do not follow the naming convention. To use these images with the document building system, create an ordinary text file containing the image filenames. This file must be named figs/Manifest-${LANG} so the build system finds it when searching for image filenames.

Example 2.3, “Building A Manifest” demonstrates one way to create this Manifest file.

rm -f figs/Manifest-en
find figs -print >/tmp/manifest
mv /tmp/manifest figs/Manifest-en

Example 2.3. Building A Manifest


displayFooter('$Date: 2008/04/10 02:37:06 $'); ?>