PUB2000: Transparent PNG and TIFF Images in Publisher 2000 (198264)



The information in this article applies to:

  • Microsoft Publisher 2000

This article was previously published under Q198264

SYMPTOMS

When you insert a picture from a PNG (Portable Network Graphic) or TIFF (Tagged Image File Format) file into a publication, it appears with an opaque background. This occurs even if the graphic file was saved with a transparent background. If you insert a picture into a Word document from the same file, it appears with a transparent background.

On the other hand, if you insert a picture from a GIF (CompuServe Graphics Interchange Format) file that was saved with a transparent background, the picture appears in Publisher with a transparent background.

CAUSE

A transparent TIFF, PNG, or GIF file is not really transparent. It is still a rectangular grid of dots of different colors. All the dots in the grid have a color value assigned to them.

In the case of the GIF file format, you are limited to 256 colors per picture. However, you can include an additional piece of information telling another program (like a Web browser or photo-editing program) to "ignore" dots of one particular color. This extra piece of information is sometimes called a transparency mask or an alpha mask.

In the case of the TIFF and PNG file formats, you can have up to 16.8 million different colors in each picture. In addition, you can include additional information telling a Web browser or photo-editing program to treat each of dots as opaque, semi-transparent, or fully transparent (256 possible levels of transparency.) This type of extra information is sometimes called a channel mask or an alpha channel.

When Publisher inserts a picture from a file, it obeys the information contained in a transparency mask. However, it ignores the information in a channel mask.

WORKAROUND

You can use Microsoft Draw 98 (which ships with Publisher) to insert a picture from PNG and TIFF image files and retain the picture's transparency.
  1. In Publisher, on the Insert menu, point to Picture and then click New Drawing. This opens a hatched drawing area in your publication, and changes the menus and toolbars to those of Microsoft Draw.
  2. On the Insert menu, point to Picture and then click From File.
  3. Browse to the folder that contains the PNG or TIFF image you want to import.
  4. Select the file and then click Open. This imports the picture and places it in the hatched drawing area in your publication.
  5. If the hatched drawing area is not big enough to hold the entire picture, you can enlarge the drawing area by dragging its corner handles. If the hatched drawing area is too big, you can also reduce the size of the drawing area by dragging its corner handles.
  6. When the picture fits properly in the hatched drawing area, click outside the drawing area. This closes Microsoft Draw and changes the menus and toolbars back to those of Publisher.
The picture should now appear in Publisher and retain its transparent background.

NOTE: Pictures inserted from transparent TIFF and PNG files do not print correctly to many types of printers, especially those that use the PostScript page description language. This is not a problem unique to Publisher, it happens with many other programs as well.

MORE INFORMATION

If you want to have an irregular-shaped picture in your publication, and you want it to print well to all printers you can use the Irregular Wrap feature.
  1. Insert a picture into your publication.
  2. On the Formatting toolbar, click the Wrap Text to Picture button. Publisher generates a Irregular Wrap Boundary that removes most of the picture's background. If the picture has a white background, the Irregular Wrap Boundary should be pretty accurate. If the picture has a different color of background, the Irregular Wrap Boundary will be less accurate.
  3. To adjust the Irregular Wrap Boundary, click the Edit Irregular Wrap Boundary button on the Formatting toolbar. You can now drag the individual control points that make up the Irregular Wrap Boundary.
  4. To add a control point, CTRL+click on the section of the Irregular Wrap Boundary where you want the new point to be. To remove a control point, CTRL+click on it. For best printing results, Irregular Wrap Boundaries should have as few control points as possible.
While you can't use this technique to add transparent areas to the middle of a picture, the picture should now print correctly to all types of printers.

Modification Type:MajorLast Reviewed:6/29/1999
Keywords:kbprb KB198264