Microsoft KB Archive/177524

= PUB: "Save As HTML" Command Converts Graphics to GIF Format =

Article ID: 177524

Article Last Modified on 6/12/2007

-

APPLIES TO


 * Microsoft Publisher 98 Standard Edition
 * Microsoft Windows NT 4.0

-



This article was previously published under Q177524





SYMPTOMS
When you view a web site created with Microsoft Publisher in a Web browser, some graphic elements do not appear as expected.



CAUSE
When you convert a Publisher file to HyperText Markup Language (HTML) format, Publisher converts all graphics and overlapping frames to CompuServe Graphics Interchange Format (GIF) images. The GIF format is limited to 256 colors (8- bit). If your original image was a 24-bit high-color image, some of the color information will be discarded when the file is converted to GIF format.



WORKAROUND
To work around this problem, use either of the following methods.

Method 1: Link to the Original Graphic
This method creates a GIF thumbnail. When the image is clicked in the Web browser, the higher-quality, original image will be displayed.

After you insert the graphic into your publication, create a hyperlink to the original graphic by following these steps.

NOTE: You must be in Web design mode and have a copy of the high-quality graphic.
 * 1) Click the image to select it.
 * 2) On the Insert menu, click Hyperlink.
 * 3) In the Create A Hyperlink To section, click "A file on your hard disk."
 * 4) In the Path Of The File box, type the path of the original graphic. Or, click Browse, select the image, and then click Open.

NOTE: Make sure that the higher-quality version of the graphic is in a format that is supported by a Web browser, such as the Joint Photographic Experts Group (JPG) format.

Now, when you view the HTML file on the Internet, you will see a high-quality version of the image when you click the GIF thumbnail.

Method 2: Modify the HTML Code Generated by Publisher
WARNING: ANY USE OF THE HTML CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this HTML code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

This method requires you to manually edit the HTML file and change the  tag so that the SRC attribute references the original graphic.

NOTE: Before you proceed with these steps, copy the original graphic file to the folder that contains your publication on the Web site. If you do not do this, the graphic will not be published to your Web site when you post the Web to your Internet Service Provider (ISP).

To change the SRC attribute of the  tag, follow these steps:  On the Windows Start menu, point to Programs, point to Accessories, and then click Notepad. On the File menu, click Open. In the Open dialog box, do the following:  Select the Web site folder that contains your publication. In the Open Files Of Type list, click All Files.</li> Select the file that contains the graphic and then click Open.

NOTE: The first page of the web site is called index.htm.</li></ol> </li> Find the line in the file that looks similar to this:

<img width=130 height=194 border=0 src="img0.gif">

</li> Modify this line of HTML code so that it references your original graphic. For example, if your original graphic is called mygraphic.jpg, change the code so that it looks like this:

<img width=130 height=194 border=0 src="mygraphic.jpg">

NOTE: The image file should be in the same folder and at the same level as the HTML file. If it is not, the Web browser may not be able to find the image.</li> On the File menu, click Save.</li> On the File menu, click Close.</li></ol>

Now, when you open this page in a Web browser, the original image appears rather than the GIF image generated by Publisher.

<div class="status_section">

STATUS
This behavior is by design. Microsoft welcomes suggestions or comments about changes in functionality and product design. NOTE: Because the Microsoft Web site is regularly updated, the site address may change without notice. If this occurs, link to the Microsoft home page at the following address:

http://www.microsoft.com/

<div class="moreinformation_section">

MORE INFORMATION
When you insert a graphic of any type into Publisher, the graphic is converted to graphic display interface (GDI) commands by the graphic filter. As a result, the native format of the graphic is not retained. Some Web authoring tools, such as FrontPage, do not interpret the graphic. Instead, they reference the original graphic by using an <IMG> tag and the SRC attribute that points to the original graphic file.

Additional query words: pub98 pub97 web page internet explorer netscape png graphics images pictures look poor pixel polar grainy source

Keywords: kbconversion kbhtml kbprb kbweb KB177524

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.