WordPerfect for DOS Updated | Site Map | Search | Troubleshooting Guide | Feedback | Voluntary Contributions | FAQ

Convert or Edit Graphics Files in WordPerfect's WPG Format


About this page | WPGtoPNG - a tool to convert WPG to other formats | WPGMaker - a tool to convert other formats to WPG | Lead Tools command-line converter | Other tools to onvert and import GIF, JPEG, and modern TIFF graphics | Convert and import modern scalable graphics | Home page


 About this page

WPDOS has no support for standard graphics formats used on the Internet, such as CompuServe GIF and JPEG, and the ConvertPerfect utility that shipped with WordPerfect cannot convert graphics in these formats into formats that WPDOS can read. Furthermore, WPDOS 5.1 (but not WPDOS 6.x) is unable to import TIFF graphic files in modern formats that use millions of colors and advanced compression techniques, and very few programs are available for converting many modern formats into the native WPG graphics format used by WPDOS. This page provides ways to convert graphic files that otherwise cannot be used in WPDOS. All non-WordPerfect software listed on this page is available at no cost.

Two versions of the WordPerfect Graphic format exist:

All these formats can incorporate vector (scalable) and raster (bitmap) graphic data. Vector graphics retain their quality when scaled up or down (like a scalable font); raster graphics lose quality when scaled up (and usually, but not always, when scaled down), and look their best only at the scale for which they were designed.

Note: With most color printers WordPerfect 5.1 can only print graphics only in grayscale, not in color. WPDOS 5.1 can print color text to all color printers; but if you want to print color graphics from WPDOS 5.1, you must either (a) buy a color PostScript printer or, if your printer is a non-PostScript printer, then (b) you must use one of this site's methods of printing to any Windows printer, and of course you must have a color printer to print to. This limitation does not apply to WPDOS 6.x, which can print color graphics to any color printer.

Except for products originally created by WordPerfect itself (WordPerfect, DrawPerfect, Presentations), the software used for importing or exporting WPG files from all other other software is written by one of the following:

The best software for editing WPG files is probably WordPerfect Presentations, which is part of the WordPerfect Office for Windows suite. Unfortunately, all versions of Presentations produce errors when saving complex images in the WPG1 format required by WPDOS 5.1. If you find that Presentations (or any other graphics program) produces imperfect files when saving to WPG1 format, use the following workaround. Save your image from Presentations (or other graphics program) to WPG2 (WordPerfect 6.x and later) format. Import the resulting WPG2 file into WordPerfect for DOS 6.x; from the Graphics menu in WPDOS 6.x, open the Image Editor, and on the Image Editor's menu, choose File, Save As..., and save the graphic in WordPerfect Graphic 1.0 (WPG1) format; you may then import the saved graphic into WPDOS 5.1.


WPGtoPNG: a utility for viewing and (optionally) converting WPG files

This WPGtoPNG utility uses the open-source libwpg filters to convert WPG graphics (in any version) to SVG format and then to PNG format for viewing or saving. Drop one or more WPG files on the utility to view the file and (optionally) save it as PNG.

Run the program without dropping a file on it to view its options. Using the command line, you can convert one or more WPG files without being prompted or you can convert to vector-based SVG format instead of the default bitmap PNG format.

Note: An option that you probably won't need, but which is left over from an older version of the utility that needed it, lets you tell the program to use the old Corel ConvertPerfect program to create an intermediate WPG file from your original, and then use that intermediate WPG with the libwpg filter to create the final output.


WPGMaker: a utility that converts standard graphic formats to WPG format

Because the Lead Tools command line tools are no longer available from the Lead Tools site (see below) this site has prepared a utility that performs many of the same actions. Download WPGMaker.exe from this link and place it in any convenient directory. You may drop graphic files on it to convert them into WPG (version 1) format; the resulting file will be in the same folder with the original, and will have the same filename, but with a .WPG extension.

Currently supported formats include BMP, EPS (the included preview is converted to WPG), GIF, JPEG, PCX, PNG, TIFF, and WMF. Contact me if you need support for other formats.

By default, the utility creates 256-color (eight-bit) WPG files. If you want 16-color (four-bit) output, you can accomplish by changing the name of the program so that it contains the string four. If you want black-and-white output (one-bit), you can change the name so that it includes the string one.

You can run the program from the command line, with this syntax (with the name of the input file; the output file will have the same name but a WPG extension).

WPGMaker.exe d:\path\to\input\filename.ext [/1 or /4 or /8]

The optional /1 or /4 or /8 parameters produce black-and-white, 16-color, 256-color (8-bit) output, even if you have changed the name of the program by adding "four" or "one" to the name.

Note that it is possible that an original black-on-white image will be converted as a white-on-black WPG graphic. If this occurs, use the graphics editor when inserting an image in WPDOS and choose the "Invert" option.

A version of this utility packaged for macOS may be downloaded here. You will need to open a terminal type in the command xattr -rc followed by a space; then drag the app into the terminal window and press return. The application should then run. To use it, drop an image file on the app; a WPG will be written to the same folder a few moments later.


Lead Tools Command Line Image File Converter: the most powerful free graphics converter for WPDOS (no longer available)

The Lead Tools Command Line Image File Converter is the most powerful and reliable free program for converting virtually any graphics file into the WPG1 format usable by both WPDOS 5.1 and WPDOS 6.x. The program was formerly available at no charge to anyone willing to enter a name and e-mail address on a sign-in page at Lead Tools' site. You may be able to find a copy online, but beware of untrustworthy download sites.

If you can optain a copy of LEADCommandLineUtils.exe file, run it to install it. You can choose a different directory from the default choice proposed by the installer, C:\LEADCMD, but I will assume that you have chosen the default directory. Open a command prompt by using the Start Menu, then Run..., and enter CMD (do not open a Command.com-based DOS prompt; the program will not work); when the prompt, opens navigate to C:\LEADCMD\BIN. Assume that you want to convert (for example) a SAMPLE.WMF graphics file to WPG format, and that SAMPLE.WMF is located in your directory C:\IMAGES. Enter the following command:

lfc c:\images\sample.wmf c:\images /F54

Note that you must specify, first, the program name "lfc" (no quotation marks); then a space, followed by the full path of the input file; then a space, followed by the full directory name for the output (not the filename); then a space, followed by /F54 (which tells the program to generate WPG files). After experimenting, you may need to add another space, then /B1 or /B4 or /B8 to specify the color-depth of the output (/B1 produces black-and-white). This command will create a file named SAMPLE.IMG in the directory c:\images; rename that file to SAMPLE.WPG and use it in WordPerfect.

Note that it is possible that an original black-on-white image will be converted as a white-on-black WPG graphic. If this occurs, use the graphics editor when inserting an image in WPDOS and choose the "Invert" option.

For further information, study the documentation that is installed together with the program; you will find it on your start menu.


Convert GIF, JPEG, and modern TIFF graphics for use with WordPerfect for DOS: other solutions

In addition to the free Lead Tools utility described above, other, smaller programs can also convert many graphics formats into WPG1 or WPG2 format. Here are seven possible methods:

(1) Open your document in WordPerfect for Windows (version 7 or any later version of the 32-bit Windows package, but not the WPWin 7 version designed for Windows 3.1 or any other 16-bit version of the program). Import GIF, JPEG, or modern TIFF graphics into the document. Save the document. Re-open it in WPDOS. This method may be the easiest to use if your graphics files have long file names.

Note: Although the Windows 3.1 version of WPWin 7 cannot directly import GIF and JPEG graphics into WP files, the CD includes a version of Presentations that can convert GIF and JPEG graphics into WPG format. (Thanks to Mark Fountain for this information.)

(2) For GIF and JPEG graphics only, use Corel's  free Windows-based CorelConvert conversion utility (the linked file is the same one on Corel's FTP site) to convert graphic images from their native formats to WPG1 (for WPDOS 5.1) or WPG2 (for WPDOS 6.x) formats. The WPG format can be imported into WPDOS. Note that conversions from other formats directly into WPG1.0 (WP5 format) may not produce usable files; if this occurs, convert the original file first into WPG2 (WP6/7/8 format), and then convert the resulting WPG2 file into WPG1 format.

When installing, take careful note of the directory where the installer will place the utility. You will not be able to find it easily unless you do this.

Note: When installing CorelConvert, ignore the confusing and irrelevant explanation displayed by the installer. When you install the program for the first time, the folder buttons to the right of the filename fields probably will not open a folder list when you click on them, so you will need to type the path and filename of the file that you want to convert. You can make the folder buttons work correctly if, and only if, you have a copy of PFREG.EXE, which came with some versions of WordPerfect for Windows; to make them work, go the folder with the convert utility and double-click on the PFOB80.PFC file. If the folder buttons still do not work, find a copy of PFREG.EXE; copy it into the folder with the conversion utility; run PFREG.EXE, and click on the "Register" button. The folder buttons should now work correctly. Note that this procedure will have only one effect: it will make the folder buttons work, so that you can select a file from a list instead of typing in a filename. This procedure will not make the conversion program perform better conversions.

(3) Use PictView for DOS, a powerful freeware DOS-based graphics converter that can be run either full-screen or from the DOS command line. The program can convert one or more files from GIF or JPG formats to a format that can be imported by WPDOS; for WPDOS 6.x, I recommend using the TIFF format; for WPDOS 5.1, I recommend using the PCX format, because TIFF files created by PictView are incompatible with WPDOS 5.1. (PCX images may look distorted in WPDOS 5.1 Print Preview, but seem to print very well.) If you want to convert files into a TIFF format usable by WPDOS 5.1, use Display.exe, described in section (4) below.

Before using PictView to convert graphics into TIFF format for WPDOS 6.x, you should make a slight change in its configuration so that your converted TIFF files can be imported into your documents. Run PictView; press F7 for Setup; choose Options for Handling TGA, TIFF, [etc.]; and find the five entries for the setting "Compression of TIFF images." Change each of these settings to PackBits. Return to the main configuration screen and choose "Exit and save changes to configuration."

Full instructions for PictView's command-line options may be found by running pictview /? at the DOS command prompt. For use with WPDOS 6.x, a typical PictView command for converting a GIF file might look like this:

pictview yourfile.gif -t --o c:\images\

This command line converts yourfile.gif to TIFF format, as specified by the -t switch (-t must be lower-case), and writes the converted file as  yourfile.tif in the output directory that is specified after  --o (note the two hyphens), in this example the directory named c:\images\ (directory names must end with a backslash). Input files may be specified with wildcards, like *.gif. Instead of an output directory, you may specify a full filename, in the form --o c:\images\convert.tif

For use with WPDOS 5.1, the command line for converting a true-color (24-million-color) TIFF image to PCX format might look like this:

pictview yourfile.tif -p --c256 --o c:\images\

This command line converts yourfile.tif to PCX format, as specified by the -p switch (-p must be lower-case); reduces the color depth to 256 with the --c switch (WPDOS rejects PCX images with more than 256 colors); and writes the converted file as yourfile.pcx in the output directory that is specified after  --o (note the two hyphens), in this example the directory named c:\images\ (directory names must end with a backslash). Input files may be specified with wildcards, like *.pcx. Instead of an output directory, you may specify a full filename, in the form --o c:\images\convert.pcx

On the PictView web page, follow the "donations for the future development" link to learn how to help the author of this excellent software, and to find a slightly revised version of the program itself. (Thanks to Mark Fountain for invaluable suggestions for this section.) Note that PictView may fail with very large image files; use Display.exe instead if this occurs.

Note: Using a programmed (not recorded) WP Shell macro, it should be possible to select a graphic from a file list in WPDOS, and then run the Shell macro to go out to DOS, use PictView to convert the file, and then return to WPDOS and import the converted file. If a WP macro expert wants to write such a macro, I would be happy to post it on this site.

(4) Use Display.exe, a freeware DOS-based file viewer and converter by Jih-Shin Ho. (Warning: This program may not work under Windows NT, 2000, or XP.) Display. exe is less automated and harder to use than PictView, but it can convert graphics directly into WPG files, and into TIFF files that can be opened by WPDOS 5.1 or later. Download the self-extracting DISPINST.EXE file; create a new directory in which to install Display.exe, and run the self-extracting file in the new directory. Open a DOS prompt (Help! How do I open a DOS prompt?), and run Display.exe to make yourself familiar with its options. Use full-screen DOS and the mouse to explore the top-line menu.

To use Display.exe to save a file in WordPerfect's native WPG format (WPG1 only), open a DOS prompt, navigate to the directory in which you placed Display.exe, and use a command line that looks like this (all on one line):

display -b wpg c:\images\yourfile.jpg c:\images\yourfile.wpg

The -b switch tells the program to use its automated batch mode; the wpg switch specifies the output format; and the final two parameters are the input filename and the name of the converted output file. Note: If you use Corel Presentations 10 to open a WPG file created by Display.exe, the file may appear defective, but in fact it is not; the file will appear correctly in WordPerfect for Windows, and will display correctly after being saved and re-opened in Presentations.

To use Display.exe to save a file in WPDOS 5.1-compatible TIFF format, use a command line that looks like this (all in one line):

display -b tif --grey --dialog c:\images\yourfile.jpg c:\images\yourfile.tif

(Note that if you use WPDOS 5.1 to print to a color PostScript printer driver, the --grey switch is not required, but it may improve output if you print with any other WPDOS 5.1 printer driver.) The -b switch tells the program to use its automated batch mode; the tif switch specifies the output format; --grey (note the two dashes) specifies greyscale output; --dialog (note the two dashes) opens the program briefly to let you specify compression options; and the final two parameters are the input filename and the name of the converted output file. Consult the documentation in the program to see other options. When the program opens briefly to let you specify compression options, you must choose packbits, then press Enter. You can also use this method to convert modern TIFF files that cannot be opened in WPDOS 5.1 into TIFF files that WPDOS 5.1 can open.

Note: If you want to avoid opening the dialog every time you convert a file for use in WPDOS 5.1, you may make a change in the Config.dis file found in the main Display.exe directory. Open the file in a text editor like Windows Notepad, or in WPDOS (but remember to save it as a DOS text file under its original name); find the section headed [TIFF] and edit the line that reads compression= so that it reads compression=2 (this specifies PackBits as the default compression option for TIFF output, and makes the resulting files compatible with WPDOS 5.1).

On my system, imported TIFF images look horrible in Print Preview and in the image editing window, but they print very nicely.

Note: The version I recommend may or may not work in systems without VESA graphics support. If you find that the program included in DISPINST.EXE does not run on your system, download the earlier version in this Windows-based self-extracting archive DISP189A.EXE.

(5) Modern TIFF images and other bitmap graphic formats can also be converted into PCX files usable in WPDOS 5.1 or later with the use of the freeware IrfanView file viewer. With the original file open in IrfanView, use the Image | Decrease Color Depth menu to reduce the color depth to 256 colors; on the same menu, remove the checkmark next to "Use Floyd-Steinberg dithering" for improved appearance in WordPerfect's built-in graphic screen (although this option may not affect printing). Use the File | Save As... menu to save the file, selecting PCX - Zsoft Paintbrush format.

Note: If you insist on spending money for software, you can achieve the same results with a US$29 commercial product for Windows, ImageConverterPlus, from fCoder Group International. When converting TIFF files to PCX, set the color depth to 8Bpp and turn off the dithering option if you want to view or manipulate the PCX image in WordPerfect's built-in graphics screen. (Information from Bob Brittenham; I have not tested this program.)

(6) A macro and a set of batch files (contributed by David Testardi) use the freeware IrfanView file viewer to perform the conversions. After downloading and installing IrfanView (use the default install location), download this DT-graphic.zip archive that contains the batch files, macro, and instructions. The following notes are provided by David Testardi:

(7) A batch file that uses PictView for DOS and a WPDOS 5.1 utility file to convert modern graphics formats into the WPG1 format used WordPerfect for DOS 5.1. See item (3) above for information on PictView for DOS; download and install it into your WordPerfect for DOS 5.1 directory; make certain that you also have the WP utility file Graphcnv.exe installed in your WPDOS 5.1 directory. (If you do not have it, run the WPDOS 5.1 installation program and install the Utility Files.) Copy the following lines into Windows Notepad or any other text editor, and save it as a batch file in the same directory; name the file something like PIC2WPG.BAT (if you are using Notepad, enter that name between quotation marks to prevent Notepad from adding a .TXT extension to the file):

pictview %1 -p --c256 --o %2.pcx
graphcnv /c=256 %2.pcx

As written, the batch file will convert the file into 256 colors; you can change the number in /c=256 to 16 to convert the file into 16-color format, or to 2 to convert the file to black-and-white; you can also change /c=256 to /g=256 in order to covert the image into grayscale with 256 shades of gray, or change the number to 16 to convert the image into grayscale with 16 shades of gray. For further information on Graphcnv.exe, enter graphcnv /h at a DOS prompt.


Convert modern scalable graphics into formats usable by WPDOS

WPDOS (especially version 5.1) cannot use graphics images created in many modern scalable graphics formats. To use images created by modern scalable graphics programs such as Adobe Illustrator, save your images in Window MetaFile format (not Enhanced Windows MetaFile), and then do one of the the following:

(a) If you use WPDOS 6.x, simply import the WMF file into WPDOS, which will have no difficulty using it.

(b) If you use WPDOS 5.1, you can use the Lead Tools command-line utility described above to convert WMF files into WPG1 format. This is the most reliable method.

(c) Alternatively, if you use WPDOS 5.1, and your WMF file is not especially complex, you can use a copy of WPDOS 6.x (see elsewhere on this site for information about obtaining a copy) or (for older Windows versions only) a copy of the Corel WordPerfect 8 Suite (easily available at a very low cost on eBay and elsewhere; see the important note immediately below). If you have WPDOS 6.x, import the WMF file; from the Graphics menu, open the Image Editor, and on the Image Editor's menu, choose File, Save As..., and save the graphic in WordPerfect Graphic 1.0 (WPG1) format; import the saved graphic into WPDOS 5.1. If you have the WordPerfect 8 suite, open Presentations 8 (preferably with the command-line switch /BSD which causes the program to open in graphic-editor mode; open the WMF file, then save it in WordPerfect 5 Graphic Format; and import the saved graphic into WPDOS 5.1. (Complex files converted by Presentations 8 or later may lack some details in the WPG output.)

Important note: More recent versions of the WordPerfect suite may or may not export WPG1 (WordPerfect 5) graphics correctly. WordPerfect X3, for example, does a very bad job of exporting graphics in WordPerfect 5 format. WordPerfect 8 performs this conversion fairly reliably, but not as well as the Lead Tools command-line utility.


Home Page  Site Map