Home > Articles

  • Print
  • + Share This
This chapter is from the book

Advanced Compression Settings

Now take a closer look at the two most common compression formats you'll be using, GIF and JPEG. Since they approach file size compression completely differently from each other and also handle colors and other information differently, they should be used for distinct purposes. If you're ever confused as to which one to apply, use the Preview tabs in the workspace to compare and contrast.

GIF Compression

Compuserve created the GIF standard when 256 colors were all that most computers were capable of displaying. Over the years the format developed into the 89a version, which is still in use today. GIF was very popular for line art and text scanning and early multimedia applications, but for photographic purposes it is very limited. With photographs the limited palette means dithering and posterization must be added to approximate the original color. This can be considered an artifact of the compression, because it artificially compromises image detail.

Still, for the vast majority of uses on the Web, GIF is a fine tool for designers. GIF images are used for typographic effects, icons, buttons, and all sorts of elemental design graphics. Incredibly small GIFs, when tiled, can create very interesting effects. The GIF format also supports multi-frame, or animated, images.

To access the GIF format directly on the Optimize panel, simply select it from the drop-down menu at the top right, underneath the Settings menu, as shown in Figure 3.10.

Figure 3.10Figure 3.10 The GIF format forces you into an 8-bit palette but creates small files and gives you ultimate control.

Palette

The GIF palette is limited to 256 total colors, or 8 bits. However, the palette can consist of as few as 2 colors, or 1 bit. The following is a list of the palette settings and tools available on the Optimize panel with the GIF format. When the GIF format is chosen, the palette presets will be available from the drop-down menu directly beneath the format menu. Many of these palette and optimization settings are also available for other 8-bit formats including PNG, PICT, BMP, and TIF.

Adaptive—An adaptive palette chooses colors based on the colors in the original image, approximating similar colors to reduce the total number of colors. This means slight gradations will flatten into a single color (posterize) and some important colors may be changed slightly.
WebSnap Adaptive—This is similar to the adaptive setting except that it favors colors within the Websafe palette. This is important when you've chosen to use Websafe colors but don't want to lose them to approximation by a regular adaptive palette.
Web 216—The Web 216, or Websafe, palette consists of colors that can be assumed to look the same on both Macintosh and Windows systems. Because of gamma, however, colors generally appear darker on a Windows system and brighter on a Macintosh system. To preview the Web 216 palette at a different gamma setting, select Macintosh Gamma or Windows Gamma from the View menu.
Exact—This can be used only when the source graphic already contains an 8-bit palette, as do imported GIFs and some Bitmap and TIFF images. This preserves the original palette colors.
Macintosh—This is the Macintosh system palette. These colors will always appear correct on Macintosh systems.
Windows—This is the Windows system palette. These colors will always appear correct on Windows systems.
Grayscale—The grayscale palette consists entirely of gray (neutral) colors. This will remove any color information from the output but will most reliably maintain subtle gradations of light and dark.
Black and White—Black and White is a 1-bit format that contains only two colors: black and white. This is usually used for line art and transparency masks.
Uniform—Uniform preserves the gradation of the palette itself, disregarding the original color information. The uniform palette is based on pixel values from the RGB Color Model.
Custom—Custom palettes can be imported from ACT palette files and from other GIF images. This is especially useful because it means you can apply a preexisting palette to new output, ensuring consistency throughout a project. After you choose the custom setting, Fireworks will prompt you with a dialog to open the ACT or GIF file.

When you change the palette setting, the results will be reflected in the palette view below. These swatches represent each of the colors that will be used in the final output. The following sections list a number of advanced controls for editing the palette.

Color Depth

To reduce the size of a GIF image quickly, use the Colors setting to reduce the number of colors. This setting determines the total number of colors available for the palette. This figure can be anywhere from 2 to 256. Halving the number of colors will generally halve the size of the image. Of course, this makes fewer colors available to the image output and could compromise quality.

You may use the dithering to approximate lost colors. Dithering arranges the available colors to simulate gradations in shading. Dithering can compromise quality when used with anti-aliasing or transparency, and dithering can carry a penalty in output file size. Setting Dither to 0 forces no dithering, whereas setting it to 100 will dither any colors outside the palette. Loss can also be used to offset the size of a full-palette or dithered GIF but carries a penalty in detail similar to JPEG compression. A setting of 0 ensures pixel accuracy; 100 fully compromises detail for file size.

Transparency

GIF images support transparency. Transparent pixels allow any color information under them, such as a Web page background color or another image layered underneath, to show through. Use the Matte setting to choose the intended background color, if different from the Canvas background color. Directly above the palette is a drop-down menu that allows you to choose between No Transparency (the default), Index Transparency, and Alpha Transparency. GIFs support only Index Transparency—pixels are either on or off, so there can be no gradation to the transparency, which often conflicts with anti-alias shading (much more on this later in the book, but see the following tip for now). Alpha transparency allows transparency shading but is only supported by the PNG format. To pick a color for transparency, choose the Select transparent color eyedropper at the bottom of the Optimize panel. To add more colors as transparent, choose Add Color to Transparency; to remove them, choose Remove Color from Transparency. Transparency will appear in the palette as a swatch of gray-and-white grid.

TIP

Aliasing is the jagged edging of curved and diagonal lines in a bitmap image. Enlarging a bitmap image accentuates the effect of aliasing. Anti-aliasing is the process of smoothing out those edges. Anti-aliasing is often also referred to as font smoothing. Font-smoothing software anti-aliases on-screen type. Graphics software programs have options to anti-alias text and graphics.

Swatches

There are more tools for managing the different colors, or swatches, in the palette. Directly below the palette display is the Sort menu, which allows you to sort the colors by Luminance or Popularity. Luminance sorts from light to dark; Popularity sorts pixels based on how often they appear in the output. Below this, and next to the transparency tools, are tools for managing individual swatches. Select a swatch and choose Edit color to choose a new value from the system color picker. Choose Snap to Web Safe to change the color to the nearest value in the Web 216 palette. The Lock color button allows you to lock the color value from further changes. To the right Add color and Delete color let you add or remove specific colors.

There are a few options for optimizing GIFs that are available only through the Optimize panel Options menu. As shown in Figure 3.11, this menu is located in the upper right corner of the Optimize panel.

Figure 3.11Figure 3.11 The Optimize panel Options menu offers more options for optimizing images, based on your current selection. Here you see the Options menu when GIF format is selected.

Interlaced

Interlacing allows the pixels in an image to be written in alternating order, so that as the image downloads, it can seem to appear full size more quickly. Every other line loads first, and these are all doubled to display an approximation of the original. Then the remaining lines are loaded in place of the doubles, clearing up the image to full detail. This is commonly used to make images appear more quickly when loading on Web pages because it carries only a small file-size penalty.

Remove Unused Colors

The default for GIF optimization, this allows you to trim down the palette quickly by removing any colors that aren't used in the output (generally because they aren't in the original, either). Remove Unused Colors will not affect locked colors in the palette. Turn this off if you want to work with a full palette and delete colors yourself.

Save Palette

This will save the palette as an ACT palette file for use with Fireworks or other applications. The Load Palette command can also be accessed from the Optimize panel menu, but this is identical to choosing a Custom palette from the palette settings in the panel itself.

JPEG Compression

Because of the limitations GIF posed to photographers, the Joint Photo Experts Group commissioned a standard that came to be known as JPEG. JPEG uses variable lossy compression, which trades quality for file size by approximating the original pixels with an algorithm. The more compression applied, the less original data available for the image, a fact which makes the image appear blurry. This blurriness is another artifact because the approximations won't always be correct, especially at high compression ratios.

JPEGs are now a standard for sharing detailed images in high resolutions. As with GIF images, the Optimize panel offers choices specific to JPEG images, as is seen in Figure 3.12.

Figure 3.12Figure 3.12 The JPEG format is deceptively simple but can offer incredible compression ratios with acceptable loss.

Matte

The Matte setting is not relevant when woring with JPEG images. It is used to match anti-aliased images to the background color of the target Web page. Matching the matte color to the background removes the blurry edges caused by previous anti-aliasing.

Quality

This is the setting for the level of lossy compression. A value of 100 is indistinguishable from the original, whereas 0 creates the absolutely smallest files. In terms of file size, the change is most noticeable between 100 and 80; a setting in this range will dramatically decrease file size with a minimum of detail loss. A setting of 60 or below gives a very small file, but detail is very noticeably compromised.

Selective Quality

One of the great features of the JPEG format is the ability to use selective compression. With this process important details can be compressed at one level, while background information is compressed at another. You'll go over selective quality in more detail in Chapter 6, "Improving Photos."

Smoothing

JPEG compression breaks an image into a grid and then uses a mathematical algorithm to approximate the content of the grid. The more compression that is applied, the more noticeable the grid and the approximations become. To help alleviate the problem, smoothing can be applied to blur these artifacts. Smoothing is a compromise, however, as it does not improve image detail and can make images appear blurry or out of focus.

Two more important JPEG settings are available from the drop-down menu in the upper right corner of the Optimize panel. Progressive JPEG, which is similar to the GIF Interlaced setting, allows for faster image displays for the Web. Sharpen Color Edges can improve text and line art detail compressed in the JPEG format.

Saving Compression Presets

Once you've worked with the Optimize panel and the preview window to examine the different qualities of GIF and JPEG compression, you may want to save them for use later. Saved setting presets are available in the Settings menu on the Optimize panel, so they're easy to find later, and as a file on your hard disk, so you can share them with others.

To save a custom setting, simply make your optimization choices and press the plus icon next to the settings drop-down. You will be prompted for a name for your preset. Enter one and press OK to continue. The preset will now be available in the settings drop-down menu. To remove a setting from the menu, choose it and then press the minus icon. You will be asked to confirm the deletion. You may also save your custom preset with the Optimize panel drop-down menu by choosing Save Settings.

TIP

Another great tool available for GIF, JPEG, and PNG compression is Optimize to Size, which you will find in the Optimize panel's drop-down menu. You will be prompted to enter a size in kilobytes, and the format settings will be automatically changed to fit the image under that value.

  • + Share This
  • 🔖 Save To Your Account

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020