PUB: "Save As HTML" Command Converts Graphics to GIF Format (177524)
The information in this article applies to:
- Microsoft Publisher 98
- the operating system: Microsoft Windows NT
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.
- Click the image to select it.
- On the Insert menu, click Hyperlink.
- In the Create A Hyperlink To section, click "A file on your hard
disk."
- 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 PublisherWARNING: 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 <IMG> 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 <IMG> 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.
- Select the file that contains the graphic and then click Open.
NOTE: The first page of the web site is called index.htm.
- Find the line in the file that looks similar to this:
<img width=130 height=194 border=0 src="img0.gif">
- 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.
- On the File menu, click Save.
- On the File menu, click Close.
Now, when you open this page in a Web browser, the original image appears rather
than the GIF image generated by Publisher.
STATUS
This behavior is by design. Microsoft welcomes suggestions or comments
about changes in functionality and product design. You are invited to
submit suggestions by filling out the form at the following Microsoft Web
site:
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:
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.
Modification Type: | Major | Last Reviewed: | 10/1/2002 |
---|
Keywords: | kbconversion kbhtml kbprb kbweb KB177524 |
---|
|