Task 8 How to Optimize Files with Variable Compression

Variable compression allows you to alter image compression and quality in different areas of the same image. You can focus more detail around a central character or image while allowing details to erode in unimportant areas, such as the background or flat areas of color. The result is an optimized image that delivers higher quality and lower bandwidth. This task describes the compression process in Photoshop; although you can optimize a file with additional channels in ImageReady following the same process, ImageReady does not add or modify channels.

  1. Open File in Photoshop

    The first part of this task involves creating a mask in Photoshop. To do this, open Photoshop and select File, Open. From the Open dialog box, select the file you want to optimize.

    graphics/p4_08fig01.jpg

  2. Create a New Channel

    Select Window, Channels to launch the Channels palette. Select New Channel from the Channels palette menu. Modify any parameters as desired in the New Channel dialog box (including mask color and area definition options) and click OK to create the new channel.

    graphics/p4_08fig02.jpg

  3. Create the Mask

    Initially, the new channel will turn the image black. To view the channel and the image as a composite, go to the Channels palette and turn on visibility for all channels, including the new channel you just created. In the final compressed image, white areas of the alpha channel will carry the most detail; black areas will have the least detail. With this in mind, paint the channel to emphasize image detail, using any of Photoshop's paint tools. When finished, turn off visibility for the alpha channel in the Channels palette.

    graphics/p4_08fig03.jpg

  4. Save for the Web

    Choose File, Save for Web to launch the Save For Web dialog box. With the mask in place, you now have the option of opening the file and optimizing it in ImageReady as well.

    graphics/p4_08fig04.jpg

  5. For JPEG Files

    In the Save For Web dialog box, select JPEG from the Optimize File Format menu. Click the icon next to the Quality control to launch the Modify Quality Setting dialog box. From the pop-up menu, select the channel created in Step 2. With the Preview box checked, adjust the slider to specify the minimum or maximum quality setting to be applied, based on the selected channel. Remember that the pure white channel areas correspond to the maximum settings, and the black areas correspond to the minimum settings. Click OK.

    graphics/p4_08fig05.jpg

  6. For GIF Files

    In the Save For Web dialog box, select GIF from the Optimize File Format menu and set the GIF settings as desired. You can use channels to modify the Dither, Lossy, and Colors settings by clicking the icon next to the associated control to open a dialog box and following the process in the preceding step.

    graphics/p4_08fig06.jpg

How-To Hints

Feather Masks for Gradual Effects

When building the mask in Photoshop, use the Blur filter or the Airbrush tool to create soft, graduated areas between light and dark sections of the mask. Doing so reduces the crisp transitions between areas of different quality.

Don't Forget PNG Files

You can also use channels to modify the quality in a PNG-8 file. Use the process outlined in Step 6 to alter the Dither and Colors settings.