Fred Endsley
Palette Management with Photoshop and Debabelizer
For image content to be published on the web or on CD-ROM, it is usually
desireable to reduce the number of colors displayed by each image, and to make
all the images conform to the same palette. This enables smaller file sizes,
quicker load and download times, and smoother animation play.
When images are saved as Index Color GIFs a "System Palette" is used which is
specific to either Mac or PC. Because of this, images made on a Mac will look
different (darker) on a PC, and vice versa. To resolve this for Web images that
will be viewed by both platforms it is advisable to conform images to the
common "browser-safe" 216 color palette that is available in Photoshop,
Debabelizer, and Director.
Because a monitor can only display one palette at a time, it is also essential
that all images to appear on a single web page share the same palette. This is
also desireable in Director movies to prevent the monitor from `flashing' as it
changes palettes belonging to different images.
Photoshop When converting the color mode of RGB images to Index
Color, there are several choices available in the pop-up menu including System
(default) for Mac or Windows, Web, Adaptive, Custom, and Previous. You should
normally choose to use Diffusion Dither for continuous tone images whenever it
is offered.
-
The System palette for Mac includes 256 colors, with the first being white and
the last being black. The Windows System palette also uses 256 colors, though
different. One problem in using the System palette is that it forces the image
to conform to a standard set of colors that might not have much to do with the
original colors in the image. This can often cause `artifacts' in your image
which are exaggerated pixel misfits.
-
The Web palette is a 256 color palette with the last 40 being black, thus
yielding a compressed palette of 216 colors that is consistent for both Mac and
PC. This can save considerable file size.
-
The Adaptive palette, when set for 8-bit, uses the 256 most representative
colors based on the image. When set for 7-bit, it uses the 128 most
representative colors. At 6-bit it uses only 64, and so on. Adaptive palettes
usually produce the best Indexed compression of continuous tone images, as well
as allowing for reduction in colors and file size.
-
When an Adaptive palette has been created for one image, it can be recallled by
setting the pop-up menu to Previous, so that other subsequent images can be
conformed to it, thus creating a group of images that all share the palette of
the first image.
-
That adaptive palette can also be saved as a Custom palette than can be loaded
at a later date to conform other related images. Any other Custom palettes can
be loaded, from wherever you have saved them, to be used during the Mode
conversion to Index Color. When producing a group of images over a period of
time that will share a custom palette, it's a good idea to store an extra copy
of the palette with the images.
-
The only problem with using an Adaptive palette from a single image to conform
a group of images is exactly that: it represents only the colors of the first
image. The following is a good strategy for making a more broadly
representative Adaptive palette:
-
Make a collage in Photoshop containing a representative sampling of all, or many,
of the images to be used. Images that will appear more often, like backgrounds
or buttons, should be more prevalent in the collage.
-
Convert the collage image from RGB to Index Color using the Adaptive palette
(maybe set at 7 or 6-bit if tolerable).
-
Convert the image back to RGB.
-
Now, again convert the image back to Index Color, this time using the Custom
palette
-
Save the Custom palette to wherever you want to kep it, and Load it whenever
you need it to conform more related images to Index Color:Custom.
Note: If you will use the images you have conformed directly on the Web,
save them as GIF files. If you will use them in Director, save them as Picts.
Debabelizer This Swiss Army Knife can, among other talents, create
`superpalettes', and convert file types and palettes of individual and batches
of images. Batch processing is probably its most useful and time-saving
feature, and is very easily scriptable.
To set up a very refined method of batch processing, use the collage image
previously created and conformed to Adaptive Palette in Photoshop, which I will
call the "superpalette image":
-
Open the superpalette image in Debabelizer.
-
Under the Palette menu, select Palette:Save.
-
Now to record a simple script: Under the Scripts menu, select "Watch Me"
-
Under the Palette menu, select "Set Palette & Remap Pixels"
-
In the window: set the palette to the one you previously saved, select "Remap"
and "Dither" and hit OK.
-
Under the Scripts menu, select "Stop Recording", name the script and save it.
(Note: In this case, to create this script you actually conformed the
palette of the superpalette image to the palette it was already conformed to.
This doesn't matter. Close the image, but keep track of it in case you need to
make a palette from it again.)
-
Now you need to create a batch list of images to process: Under the File menu,
open Batch:Save.
-
Select "New" in the upper left corner of the window. Enter a "New Batch Name"
(lower right), and find and Append all the files you want to batch convert. Hit
Save.
-
Back in the Batch Save window, select the Batch List you want to convert from
the pop-up menu (upper left).
-
In the "Do Script" pop-up menu (upper right) select the palette conversion
script you previously recorded.
-
Set the delay you want (1 second is fine, or none at all).
-
Set the Auto Naming Options:
-
"Original Name +"
-
"Strip Extension First"
-
"Extension for Save Type"
-
"Don't Duplicate Extension"
-
Set the folder to Save the converted files to.
-
Select the file type from the pop-up menu
-
Auto set Colors
-
Hit "Do It", and relax and enjoy automated batch processing.
Note: Unless you delete your script, palette, and batch list, they will
be maintained in the Debabelizer program.
Debabelizer can also convert Quicktime, 3-D, and many other types of Mac and PC
file types, as well as batch cropping, batch applying of Photoshop filters,
etc. Don't be intimidated, and if you get confused, use the internal Help.