|
To access the contents, click the chapter and section titles.
Platinum Edition Using HTML 4, XML, and Java 1.2
PNG offers broad support for many kinds of images, including
One thing that PNG does not support, however, is animation. Recall that for animated GIFs, the many images that compose the animation are stored together in one file. PNG was developed as a single-image file format, so no way exists for it to support animation.
Browser and image software support for PNG was a little tentative for the first year, but then Microsoft took the step of making PNG the native format for its Office97 suite of products and announced its intention to provide inline support for PNG graphics in release 4 of its Internet Explorer browser. Since then, many other companies have followed suit, and PNG is now supported by the following software:
Thus, it is possible for you to start creating PNG graphics for your Web pages now, and visitors using the most recent releases of Netscape or Microsoft browsers will be able to view them. Alternatively, you can convert your existing GIF and JPEG graphics to PNG using one of the more PNG-compliant conversion tools such as Adobe File Utilities, DeBabelizer Pro (Windows), or DeBabelizer ToolBox (Macintosh).
Choosing a FormatThe question of which format to use is often a daunting one for beginning designers. Fortunately, some ways are available to focus your thinking as you make this choice:
Using the Browser-Safe Color PaletteLynda Weinman, a popular author on the topics of Web graphics and color, has advanced the idea of a browser-safe palettea set of colors rendered the same way by any browser on any platform. Netscape Navigator and Microsoft Internet Explorer both use the same default 256-color palette when rendering Web pages, but because of slight differences between the PC and the Macintosh, 40 of these colors can appear differently, depending on the platform. If you remove these 40 colors from the default palette, the remaining 216 colors compose a palette that should appear the same regardless of a users hardware or software. The browser-safe color palette is freely available from http://www.lynda.com/hex.html, ordered both by hue and by RGB color values. You are welcome to download the palette and use it to make your GIF images and other colored page elements as browser friendly as possible. Macintosh users can check out Pantones ColorWeb color selection application at http://www.pantone.com/catalog/colorwebss.html. Creating Transparent GIFsWhen you make a transparent GIF, you designate one color in the images palette to be the transparent color. Pixels painted with the transparent color enable the background color to show through. Figure 5.11 showed you transparent and nontransparent versions of the same image. This technique is useful in getting rid of the bounding box that typically surrounds a graphic. When you compose an image in a graphics program, the workspace is almost always rectangular. Your image goes inside this rectangular region (the bounding box), and invariably some amount of space exists between the image and the edges of the box. By choosing the color of the excess space pixels to be transparent, you make them disappear on the browser screen. This is what happened in Figure 5.11. The bounding box pixels in the image using the transparency option were the ones designated as transparent, so they enabled the white background to show through and give the effect of the circle sitting right on top of the Web page.
Many popular graphic programs support transparent GIFs. One such program that you will find on the CD-ROM with this book is LView Pro. LView Pro is a terrific shareware program that is well worth the $40 you will pay for the license. Creating a transparent GIF in LView Pro involves the following two simple steps:
Figure 5.13 shows the LView Pro interface. On the right side of the screen, you will find the Color Selection dialog bar. Along the top of the bar, three rectangles display, from left to right, the foreground color, the background color, and the transparent color. To change the transparent color, move your mouse pointer to the color in the color palette (at the bottom of the dialog bar) that you want to be the new transparent color; press the Alt key and click either mouse button. You should see the color in the third rectangle at the top change to the color you selected.
|
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. |