Appendix C. Adjusting Color Depth

[ LiB ]

Appendix C. Adjusting Color Depth

Color depth is the amount of color dataand thus the maximum number of colorsthat an image can accommodate. Color depth is determined by the number of bits used to store the color information of a pixel in an image.

The lowest color depth is 1 bit, which accommodates only two colors: black and white. The highest color depth in Paint Shop Pro is 24 bit, which can accommodate up to 16.7 million colors.

NOTE

graphic/p1.gif TIP

If a Paint Shop Pro operation you want to use is greyed out, chances are that the color depth of your image is too low. Many of Paint Shop Pro's operations work only on greyscale images and 24-bit (16-million color) images.

If you want to apply one of these operations to an image with a lower color depth, you can temporarily increase the color depth to 24 bit. Choose I mage > I ncrease Color Depth > 1 6 Million Colors (24-bit). Later, you can return the image to its original color depth by choosing I mage > D ecrease Color Depth.

A 24-bit image has three 8-bit color channels, each channel having 256 levels of brightness. A pixel that has 0 as the value of each channel is black, and a pixel that has 255 as the value of each channel is white. Using other values results in colors and shades of grey. Altogether, 256x256x256 (16.7 million) different values can be stored in those 24 bits.

Two basic types of images use a single 8-bit channel: 256-color images and greyscale images. These images are "paletted"256 fixed colors or shades of grey are used to represent all the colors or brightness levels in the image. The colors or shades of grey are arranged in a palette, with each color assigned a palette index (depending on the color's order in the palette). Figure C.1 shows the Web graphics Safety Palette included with Paint Shop Pro. Notice that in this figure the tile with Palette index 251 is highlighted and that this tile has color channel values of Red 239, Green 240, and Blue 243 (whose HTML value is #EFF0F3).

Figure C.1. Safety Palette (Safety.PspPalette).

graphic/apcfig01.gif


NOTE

graphic/p1.gif TIP

To display the palette of an 8-bit image, choose I mage > Pa l ette > E dit Palette. You can replace colors in the palette by double-clicking a color tile in the palette and then using the Color dialog box to replace the original color of that tile.

To view an image's color depth, choose I mage > Image I n formation, and look at Pixel depth/colors in the Image pane. An 8-bit color image will show 8/256, whereas a 24-bit color image will show 24/16 Million.

To increase an image's color depth, choose I mage > I ncrease Color Depth, and then choose the color depth you want. Decreasing an image's color depth is a little more involved, however.

NOTE

graphic/p2.gif NOTE

Typically, the reason you decrease an image's color depth is to optimize its file size. Another frequent use is the obligatory color reduction that occurs when you edit a 24-bit image and then save it in GIF format, which is an 8-bit file format. You can also produce interesting effects by reducing color depth, as can be seen throughout http://www.campratty.com , home of Paint Shop Pro's Very Frequently Asked Questions.

To decrease an image's color depth, choose I mage > D ecrease Color Depth. After selecting the color depth you want, you will then see one of the Decrease Color Depth dialog boxes shown in Figures C.2 through C.5, depending on which color depth you chose.

Figure C.2. Decrease Color Depth -64K Colors (24 bit) dialog box (the 32K Colors dialog box is similar).

graphic/apcfig02.gif


Figure C.3. Decrease Color Depth -256 Colors (8 bit) dialog box (the 16 Colors dialog box is similar).

graphic/apcfig03.gif


Figure C.4. Decrease Color Depth - 2 Colors (1 bit) dialog box.

graphic/apcfig04.gif


Figure C.5. Decrease Color Depth - X Colors (4/8 bit) dialog box.

graphic/apcfig05.gif


If you choose to decrease the color depth to 64K or 32K, you must choose a reduction method: either Nearest color or Error diffusion . With Nearest color , a pixel's color is replaced with the color closest to it that appears in the reduced color palette. Error diffusion also replaces a pixel's color with the closest color in the reduced palette, but the difference from the original color (the error) is passed on to the next pixel, and so on. This method spreads the error in the color replacement across all the pixels in the image. Typically, the Error diffusion method produces an image whose colors approximate those of the original image more closely than the Nearest color method does.

NOTE

graphic/p3.gif CAUTION

64K-color (16-bit) and 32K-color (15-bit) images are handled in memory as 24-bit images. As a result, their color depth might be inadvertently set to 16 million colors (24-bit) if you perform any operation on these images other than Save , Save As , or Save Copy As . If you want color depth reductions to 64K or 32K colors, your best bet is to perform the reduction immediately before saving the image.

If you choose to reduce color depth to 256 colors and select Standard / Web-safe for the palette, you have a third option for a color reduction method: Ordered dither . Dithering is the mixing together of pixels of two or more different colors to create the illusion of a color that doesn't itself appear in the palette. This mixing of colors with Ordered dither often produces an obvious pattern, sometimes making your image resemble a color picture on newsprint.

When you reduce to either 256 colors or 16 colors, you must choose a Palette and a Reduction method . The following are the palette-generation methods to choose from when you reduce to 256 colors:

  • Optimized Median Cut and Optimized Octree. Both methods produce adaptive palettes (palettes based on the number and distribution of colors in the original image). They use different algorithms, however, and so can yield noticeably different results. In general, Optimized Octree produces results that include more of the colors present in the original, while Optimized Median Cut favors the most prevalent colors of the original.

  • Standard / Web-safe. This uses a standard palette that includes colors from across the spectrum that display well at a screen setting of 256 colors. Results with this palette are usually far from the best. (Note that with today's video displays, it's not necessary to use the Web-safe palette for your Web graphics.)

NOTE

graphic/p2.gif NOTE

For color reduction to 16 colors, you'll have Windows' in place of Standard / Web- safe as one of the reduction methods. Although there was reason to choose this method in the past, it is no longer necessary.

The following are three other options that you can set when reducing to 256 or 16 colors:

  • When you reduce to 256 colors and choose one of the adaptive palettes Optimized Median Cut or Optimized Octreeyou have the option of including the standard Windows colors in the palette. This is, however, never necessary.

  • If you choose Error diffusion as the reduction method, you then have the option to select Reduce color bleeding , which minimizes the bleeding of colors from left to right that the Error diffusion method produces.

  • You can select the third option, Boost marked colors by , to emphasize colors in a selection that you made before initiating the color reduction. Paint Shop Pro will attempt to include in the resulting palette the colors contained in the selection. If you choose this option, you also can set a value for the degree of the color boost, from 1 (least effect) to 10 (greatest effect).

With Decrease Color Depth - X Colors , you can reduce the color depth of an image to any number between 2 and 256. You can choose the number of colors to be included in the palette and either the Nearest color or the Error diffusion reduction method. You can also choose whether to include the Windows colors. If you have a selection in your image, you also can choose Boost marked colors by . And if you select Error diffusion as the Reduction method, you have the option to select Reduce color bleeding .

NOTE

graphic/p2.gif NOTE

When Include Windows colors is selected, the smallest number of colors you can specify is 20.

You also can reduce the color depth of an image to two colors (black and white). Among other things, this can be useful for simulating halftones and other printlike effects. Ordered dither and the various Error diffusion methods are fun to experiment with here, and don't forget to try both the Weighted and Non-weighted options under Palette weight.

NOTE

graphic/p2.gif NOTE

Paint Shop Pro enables you to edit the palette of a 1-bit image. For example, you can change the white palette entry to blue and change the black palette entry to yellow. To try it yourself, choose I mage > Pa l ette > E dit Palette (or press Shift+P) when you have a 1-bit image open . In the Edit Palette dialog box, click one of the two palette entries. Then select a new color as you normally would in the Color dialog box.

NOTE

graphic/p2.gif NOTE

You can decrease the color depth of a 24-bit image to a lower bit depth only if the image has a single layer. If you try to adjust the color depth of a multilayered image, Paint Shop Pro asks whether you want to flatten the image. If you choose OK, the image is flattened and the color depth is adjusted. If you choose Cancel, the image is left alone and the color-depth adjustment is aborted.

[ LiB ]


Paint Shop Pro 8 Power
Paint Shop Pro 8 Power!
ISBN: B001QCXEI6
EAN: N/A
Year: 2006
Pages: 125
Authors: Lori J. Davis

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net