Optimizing the Logo
The goal of optimizing Web graphics is to avoid long download times by limiting the file size. The challenge is to limit the page size in such a way that image quality is not sacrificed along the way. In other words, to optimize a graphic, you need to balance the file size and image quality. However, the many factors involved often complicate the optimization process.
You’ll find the optimization process easier if you understand some basics about the different graphic file types, including their distinct advantages, disadvantages, and unique capabilities. In general, for screen-viewing purposes, you have a choice of three viable formats: GIF, JPEG, and PNG. The PNG (Portable Network Graphic) file format, although a flexible and compact format, is unfortunately only partially supported by most browsers. As a result, it’s best not to publish PNG files directly to the Web (though it’s an ideal format for sending graphics to other applications, such as Flash).
Because PNG files are not ideal for Web publishing, you have two choices for exporting most graphics for use on the Web: GIF and JPEG. Let’s look at each.
In general, images with limited colors, distinct edges, and large areas of solid colors work well as GIF (CompuServe Graphics Interchange Format) files. Logos (as shown in the following figure), charts, vector graphics, diagrams, and text are best compressed as GIFs.
In many respects, JPEG (Joint Photographic Expert Group) is the opposite of GIF. JPEGs excel at representing millions of colors, as is often the case in digital photography (as shown in the following figure). As a result, you should choose JPEG as your compression format for digital photos, images with millions of colors, complex images that do not have wide areas of single colors, and images that have subtle transitions and gradations of color. JPEGs do not support animation or transparency. In general, you should avoid using JPEGs with text, graphics with sharp edges, or logos.
Now let’s return to our first task: optimizing the Jade Valley Web site logo. You’ll first need to decide which file format to choose (a decision that Fireworks can help you make). After you’ve made that decision, you’ll need to provide additional information specific to the chosen file format, while balancing image size and quality.
Let’s get started!
- Open Fireworks, and open interface_slices.png in the Lesson 3 Start folder.
This is the file you completed in Lesson 2, Designing a Page Interface. Because you finalized the whole-page design at the end of the last lesson, you’ll use it to optimize all the graphic slices and export the design.
- With the file open, click the 4-Up View button.
Fireworks provides two environments for graphic optimization: one is the Export Preview dialog and the other is a combination of the three Preview tabs (Preview, 2-Up, and 4-Up) and the Optimize panel. The most challenging task when optimizing graphics is walking the fine line between file size and image quality; therefore, the Preview-tab environment is especially helpful because you can experiment with different settings and compare their size and quality with ease.
When you click the 4-Up View button, the original file appears in the top-left corner, and you can compare three optimized preview panes simultaneously. In addition to letting you compare image quality, all preview tabs provide useful information such as export type, export options, estimated file size, estimated download time on a 56K modem, and so on.
- Select the Hand tool in the Tools panel and drag the original file interface_slices.png to the top-left corner of the Document
window so you can see the entire Jade Valley Web site logo and make sure it’s in focus.
The whole-page design contains many slices. Each slice will be exported as a different graphic, which means that you can optimize each slice according to its own needs, without regard for the optimization settings associated with other slices.
The Hand tool works well to help bring the slice into focus so that you can see the slice you’re trying to optimize. Notice that when you drag the original file, the images in the surrounding panes move as well.
- Switch to the Pointer tool in the Tools panel and select the logo slice. To show the Optimize panel, if necessary, choose
Windows > Optimize (or press the F6 key on your keyboard).
The other part of the combined optimization environment is the Optimize panel. This panel provides convenient access to all the settings you need in order to optimize the graphics. As the following figures show, the Optimize panel has different settings for GIF and JPEG, reflecting the nature of the file formats.
- Click the logo slice in the lower-left pane in the Document window to activate it. In the Optimize panel, select JPEG - Better
Quality from the Saved settings drop-down list.
As mentioned earlier, optimization is a two-stage process; in the first stage, you choose a file type, typically GIF or JPEG. In the second stage, you enter settings appropriate to the selected file type. In this step, you begin the process of identifying which file type is more appropriate for this file. You’ve selected JPEG as your exported file format for the lower-left pane, and in a moment, you will enter other possible file types in the other two panes, and then compare the three results.
Notice that the JPEG - Better Quality setting results in an estimated 3.33K file size, and would take approximately 0 seconds (which really means “under 1 second”) to download the Jade Valley logo on a 56K modem.
Optionally, take a moment to experiment with other setting options in the Optimize panel. For example, drag the Quality slider lower than 80 and see how it affects the estimated file size and the image quality. When you’re finished, make sure you set the slider back to 80.
- Click the logo slice in the upper-right pane of the Document window. In the Optimize panel, choose GIF Web 216 from the Saved
settings drop-down list.
This time, you’ve chosen GIF as the output file type. Unlike JPEG, GIF lacks a Quality slider. Instead, to control the file size and image quality of a GIF, you must work with its color palette. Every GIF has a color palette of 256 colors or fewer. Many images have more than 256 colors, so GIF has to represent all the colors as best as it can with the limited colors available to its palette. For example, if the original image has 2,500 colors, 90 percent of those colors will be dropped from the file, and the pixels that used those colors will use the nearest available color. So how does Fireworks determine which colors are in the color palette, and which ones are thrown out?
With the exception of special palettes, such as grayscale palettes that use only black, white, and gray pixels, Fireworks does its best to represent all the original colors, taking into account two conflicting considerations:
-
Color fidelity: Fireworks tries to pick colors that best represent the colors in the original image.
-
Conformance to the Web Safe palette: In the early 1990s, 8-bit video cards displayed 256 colors. Windows and Macintosh systems use 40 colors for system menus, and the remaining 216 colors are available on all monitors with 8-bit color or higher. In the mid-1990s, designers tried to stick to these 216 colors, to ensure that everyone could see what they designed. For almost a decade, most computers have shipped with video cards capable of displaying 16.7 million colors or even more. Thus, the Web Safe palette is quickly becoming an obsolete concept.
The color palette you chose in this step, GIF Web 216, forces Fireworks to use colors in that 216-color Web Safe palette. As a result, color shifting occurs, and the logo doesn’t look like it did before. We can get a much better representation of our file using GIF, but not with this palette.
The GIF Web 216 setting produces a smaller file size (e.g., 2.60K), compared to the JPEG - Better Quality setting. As with the JPEG setting, the GIF Web 216 setting will take less than a second to download on a 56K modem. If file size is all you care about, then this setting is a better choice. But file size isn’t everything; the image looks awful.
You should think twice before choosing Web 216 as the optimization setting. For example, in an effort to create branding, corporate logos generally contain official colors (e.g., the yellow in McDonalds’ arch or the bright red in the Coca Cola logo). If your company’s logo has an official color, and you choose Web 216 as the optimizing setting for the logo, you’re likely to end up with a different color!
-
- Click the logo slice in the lower-right pane of the Document window. In the Optimize panel, choose GIF Adaptive 256 from the
Saved settings drop-down list.
Whereas GIF Web 216 prioritized Web Safe color way above color fidelity (and the file shifted color accordingly), GIF Adaptive is the other extreme; all it cares about is color fidelity, and it doesn’t take the Web Safe palette into consideration. Of the three, this version of the logo probably looks the best, although it’s also the largest.
- Choose the GIF Adaptive 256 setting as the final optimization setting by making sure the logo slice in the lower-right pane is selected. Click the Original button in the Document window to return to the interface_slices.png file.
GIF Adaptive 256 should be the chosen optimization setting in the Optimize panel.
You chose GIF Adaptive 256 as the final optimization setting for the logo slice because it was best looking of the three choices. It has better color fidelity than the Web Safe version, and the edges of the text are clearer than those of the JPEG, which look slightly blurry. And although it’s also the largest file, it’s still only 4K, which takes less than a second to download, so the difference in download time is negligible.