#### 31.3.2.1 Substituting graphics files for RTF

If any graphics referenced in your FrameMaker document are not BMP or WMF, unless you map those graphics to replacements, Mif2Go puts them in an INCLUDEPICTURE field for Word output, and omits them from WinHelp output.

In this section:

§31.3.2.1.1 Replacing WMF files with BMP files

§31.3.2.1.2 Substituting files with different extensions

§31.3.2.1.3 Substituting files with different names or locations

§31.3.2.1.4 Understanding replacement examples

##### 31.3.2.1.1 Replacing WMF files with BMP files

If all you want to do is change the file extension for referenced WMF files that you are replacing with referenced BMP files, and if both of the following are true:

• the BMP files are in the same directory as the WMF files

• none of the BMP files form parts of FrameMaker vector graphics

you can use the following settings:

[Graphics]

; NameWMFsAsBMPs = No (default)

; or Yes (to change .wmf refs in the .rtf)

; EmbedBMPsInWMFs = Yes (default, includes scaling info) or No

NameWMFsAsBMPs=Yes

EmbedBMPsInWMFs=No

This setting is intended mainly for those who have to replace the WMFs generated by Mif2Go, in order to deal with a resource-leak defect in Windows 9x systems. See §8.6.2 Avoiding the GDI resource leak.

##### 31.3.2.1.2 Substituting files with different extensions

The simplest way to substitute graphics in a different format is as follows:

• give all the replacement graphics the same base names as the originals

• put all the replacement graphics in the project directory.

Then you can simply map the old extension to the new extension, as follows:

[Graphics]

FileNames=Map

FilePaths=None

[GraphFiles]

oldext=newext

Do not include a leading dot when you map extensions. For example:

[GraphFiles]

jpg=bmp

However, if some of your replacement graphics have different base names or are in other directories, mapping old to new files becomes more complex. See §31.3.2.1.3 Substituting files with different names or locations.

##### 31.3.2.1.3 Substituting files with different names or locations

You can tell Mif2Go to look for replacement files that differ from the original files in any or all of the following respects:

• different location (file path)

• different base file name

• different file extension.

To map referenced graphics to replacements:

[Graphics]

; FileNames = Retain (default) or Map (in the GraphFiles section)

; FilePaths (for graphics) = Retain (default) or None (strip off)

FileNames=Map

To specify different file paths, different names, or different extensions, when FileNames=Map:

[GraphFiles]

; types to map, replace extension, old=new for referenced graphics

; specific filenames to replace, old = new, overrides type setting

Note: When you specify paths in [GraphFiles], use forward slashes for separators.

Table 31-1 shows where Mif2Go expects to find replacement files for various combinations of FileNames and FilePaths values and [GraphFiles] settings.

Table 31-1 RTF replacement graphics file mappings and locations

FileNames | Valid [GraphFiles] mappings | Replacement directory when FilePaths =
Original graphics file(s) | = | Replacement file(s) | Retain | None
Retain | Ignored |  |  | Original | Output
Map | ext | = | ext | Original | Output
filename.ext | = | filename.ext | Output | Output
path/filename.ext | = | filename.ext | Output | Output
filename.ext | = | path/filename.ext | Per [GraphFiles] path
path/filename.ext | = | path/filename.ext | Per [GraphFiles] path

FileNames=Map

When FileNames=Map, Mif2Go uses the settings in [GraphFiles] to find replacements.

FileNames=Retain

When FileNames=Retain, Mif2Go ignores the settings in [GraphFiles], and looks for replacements in one of two places (determined by the FilePaths setting): the same directory as the original graphics, or the project directory.

FilePaths=None

When FilePaths=None, Mif2Go ignores the path component of the file references in FrameMaker. Unless you specify FileNames=Map and a different path in [GraphFiles], Mif2Go looks for replacements only in the project directory.

You can use FilePaths=None when you are converting on a system different from the system used for authoring or editing, to avoid replicating the directory structure. This setting prevents problems with attempted access to drives (such as network drives) that do not exist on the system used for conversions, but do exist on the systems used for authoring or editing.

FilePaths=Retain

When FilePaths=Retain, unless you specify FileNames=Map and different paths for both original and replacement files in [GraphFiles], Mif2Go looks for replacement graphics only in the same directory as the original files.

Avoid specifying original file paths

It is best to use FilePaths=None, and put the replacements in the project directory. This is because specifying original file paths in [GraphFiles] is problematic; success depends on exactly matching the paths in FrameMaker, whether they are absolute or relative.

##### 31.3.2.1.4 Understanding replacement examples

If replacement graphics have the same base names as the originals, and are located in the same directory with the originals, and you are replacing some or all GIFs with BMPs:

[Graphics]

FilePaths=Retain

FileNames=Map

[GraphFiles]

gif=bmp

If all replacement graphics are in the project directory, and you are replacing GIFs with BMPs, and in one instance replacing an existing BMP with a new one:

[Graphics]

FilePaths=None

FileNames=Map

[GraphFiles]

gif=bmp

oldpic.bmp=newpic.bmp

If some replacement graphics are not with originals and not in the project directory, you must specify paths to the replacement files:

[Graphics]

FilePaths=None

FileNames=Map

[GraphFiles]

oldpic.bmp=D:/Graphics/Beta/newpic.bmp

If some of the replacement graphics are in the same directory as the original graphics, but some of the base file names are different, you must specify both the original and the replacement path:

[Graphics]

FilePaths=Retain

FileNames=Map

[GraphFiles]

D:/Graphics/oldpic.bmp=D:/Graphics/newpic.bmp

Because path references in FrameMaker could be relative or absolute, it is better to avoid specifying paths to the left of the equals sign in [GraphFiles]; instead, move or copy the replacement graphics to the project directory, and set FilePaths=None.

| 31.3.2 Changing graphics files for RTF output |  | 31.3.2.2 Using already converted graphics for RTF |