How to insert graphics into RTFs
(for compatibility with WinHelp and to minimize file size)

Topic status automatically displays here - do not remove.

Bookmark me!Bookmark this topic  Print me!Print this topic

Why bother fussing with Graphics?

This topic will lead you through the labyrinth of possibilities necessary to capture screengrabs, properly save them as restricted resolution bitmaps, insert them into RTFs for compatibility with Word and WinHelp, and finally to minimize file sizes.

We explore and discuss the associated problems and limitations of:

WinHelp has a number of limitations with the use of graphics, including supporting limited file types and colour resolutions. See WinHelp Graphic Limitations.

Importantly, the method used to capture the bitmap in the first place also appears to greatly affect the final display quality as well. See How to properly capture a bitmap.

Separate bitmap files are necessary for copying into the WinHelp source RTFs. See Separate Bitmap Files.

The recommended method for inserting graphics in an RTF in Word is described in How to insert a link-only bitmap to an RTF. How to insert a link to a bitmap for display in WinHelp is described in WinHelp Bitmap Syntax.

For those that are interested, some investigation has shown that when it comes to inserting graphics into Word RTFs, different methods do indeed produce different results. Microsoft Word supports one primary and two secondary methods for inserting graphics into a document as explained below. See Methods for inserting graphics into Word.


Back to Top

WinHelp Graphic Limitations

WinHelp has a number of limitations with the use of graphics, including only supporting Windows bitmaps (.BMP), Device independent bitmaps (.DIB), Windows metafiles (.WMF), and segmented hyper-graphic bitmaps (.SHG). WinHelp also only supports optimised 16-colour resolution (yet apparently can accurately display 256 colours), so bitmaps must supposedly be reduced to this resolution before they can be accurately displayed in WinHelp.

Colour reduction greatly reduces bitmap file size. For example, if the graphic is a bitmap consisting of black and white line drawings, it can be colour reduced to monochrome resolution.  For information about bitmaps, see the separate topic on Bitmap File Formats and Colour Resolution.

Tip Tip

Paint Shop Pro can be used to reduce colours used in a graphic. Select Colors | Decrease Color Depth.


Back to Top

How to Properly Capture a Bitmap
(for compatibility with WinHelp and to minimize filesize)

The method used for capturing a bitmap from screen DOES greatly influence both the file size and the display quality of the bitmap.

Important Important

The bitmap representation in Word and WinHelp must display at the same size and resolution as the original screengrab. Lesser quality is unacceptable, for it only takes a little care to prepare your machine for proper screengrabs, and a knowledgeable usage of software to save the bitmap appropriately and properly.

  1. As WinHelp has a stated colour display resolution of only 16 colours (yet apparently can accurately display 256 colours), the resolution of the screen upon which the capturing is to occur, MUST BE SET TO 256 COLOURS or less BEFORE the capture is made.
  2. The bitmap MUST be saved using Microsoft Paint or Paint Shop Pro 3. (It apparently saves bitmaps differently to PSP6).

You can see the differences here if you set your monitor to 256 colours.

The following graphic was grabbed from a machine with resolution higher than 256 colours and saved with PSP6: (File size of 591KB)


Notice the bastardisation of the graduated colour of the titlebar.

The first of the following graphics was colour reduced from the original full colour 591KB bitmap and resaved using PSP6, and the second with PSP3.

Colour reduced to 256 colours and saved using PSP6: (File size of 198KB)


Saved using PSP3: (File size of 78KB)


Both unacceptable displays. Notice the file size difference between the versions of PSP for the same image (198 & 78KB).

The following graphic was captured on a screen with 256 colour resolution and saved with PSP6. The bitmap was reopened in PSP3 and then resaved using PSP3:  (File size of 36KB)


Much better! Notice that the file size difference between the original full colour bitmap saved with PSP6, and the reduced 256 colour version saved with PSP3, is a staggering (591-36=) 555KB!



So, the logical conclusion here is that first the screengrab should be taken from a screen already set to a resolution of 256 colours or less, AND the program used to save the screengrab as a bitmap should be PSP3! This results in the clearest display and the smallest file size.

Once you've taken a screengrab and pasted it into PSP3, you should save it as a separate bitmap file in the same folder as the RTF that it's going to be displayed within. See Separate Bitmap Files.

Back to Top

Separate Bitmap Files

More often than not, the graphics used in CitectSCADA WinHelp are either screen-grabs or bitmaps sourced from driver specs. A separate bitmap file should be created and stored in the same folder as the topic it displays within so that it can be linked to without a path structure in the link, and so that it can be readily located for maintenance purposes. This also provides the source of the graphic separate to the RTF, should it need to be altered in the future.

The bitmap should be colour reduced to 256 colours or less if possible, so that it will accurately display in WinHelp and on VGA monitors. Having separate bitmap files permits each bitmap to be colour reduced using a separate graphics program like Paint Shop Pro. See WinHelp graphic limitations.

Once a bitmap is saved as a separate file, links can be inserted into an RTF file for appropriate display in Word and WinHelp. See .

Back to Top

To insert a link-only bitmap to an RTF in Word:

Note Note

This procedure assumes that you have already created a proper separate WinHelp compatible bitmap file as described in Separate Bitmap Files.

  1. Open the document in Word, place the insertion point where required. If this graphic is to be in its own paragraph, the paragraph should be formatted as 'Figure' style.
  2. From the main menu, select Insert | Picture | From File.
  3. Browse to and select the appropriate bitmap.

    Important Important

    Do NOT double-click on the selection or the file will become inserted AND embedded which is not what we want.

  4. Once the file is selected (highlighted) you MUST select the drop-down next to the Insert button, and click on Link to File.


Back to Top

The syntax for the WinHelp bitmap link is:

{bm<x> <bitmapfilename>}  

Where the {bm<x>} statement inserts a graphic into a topic when the Help file is compiled.

<x> specifies how the graphic aligns itself within the paragraph. Either L for Left, C for centre or R for right.

<bitmapfilename> specifies the name of the graphic file to include. You can include bitmaps, multiple-hotspot bitmaps (.SHG), and multiple-resolution graphic files (.MRB).


{bml TSeriesEthernet.bmp}

which displays in Word when placed next to the same linked graphic as:


Back to Top

Important Important

The following section is provided for historical purposes to provide the reasons as to why we should link to graphics using the methods as described above.

Back to Top

Methods for Inserting Graphics into Word

The Microsoft recommended primary method for inserting graphics into an RTF file using Microsoft Word is:

However, if the picture is copied to the clipboard, it can alternatively be inserted using:

No discernable differences were observable when these graphics were printed from the RTF in Word and the WinHelp topic, even the blurry inserted and or linked pictures from file printed clearly.

Therefore, it would appear that Paste Special Picture from the clipboard is the best option with small B&W images, as it provides as clear a display as any, and carries the smallest overhead.

To do so however, requires that the bitmap exist as a separate file. See Separate Bitmap Files.

Back to Top

(The wrong way) To insert a bitmap into an RTF

xyz Caution

This procedure was the inherited method for inserting graphics into RTFs (which blew out file sizes), and is no longer recommended.

Note Note

This procedure assumes that you have already created a proper separate WinHelp compatible bitmap file as described in Separate Bitmap Files.

  1. Open the bitmap in Paint. (Double-click on the file in Windows Explorer.)
  2. Select all of the bitmap using Edit | Select All. (CTRL + A)
  3. Copy the bitmap to the Clipboard. (CTRL + C)
  4. Swap to Word. Place the insertion point where required, and select Edit | Paste Special from the main menu.
  5. Check that Word properly recognizes the bitmap by displaying the Source type as 'Bitmap Image' with a full path to the file. If so, continue to the next step in this procedure. If not, go back to step 2 above.
  6. Select Picture from the list and click OK.
  7. Swap to Windows Explorer, locate the RTF and note the file size. Save the RTF and recheck the file size. Ensure that it only increased by 7-10K more than the size of the bitmap file size.
  8. Swap to and close Paint (if no further graphics to copy).

Note Note

Bitmaps copied from Paint Shop Pro are not recognized by Word.

Back to Top

See Also

xyz Lotech Solutions' Tips, Tricks, and Procedures | Bitmap File Formats and Colour Resolution

Back to Top