Building an Optimized Palatte
Working with Windows palettes can be difficult, if you don't understand how
they work. Actually, they can be difficult even if you *do* know how they
work. In any event, Appendix B of the User Manual may help.
But to answer your question, there are two "simple" things you can do.
- The most certain approach is to apply a palette to your book. This will
remove any chance of palette flashes. Digital Video Producer (included with
Multimedia ToolBook 3.0) allows you to create an optimized palette specific
to your bitmaps by loading them, moving them to the timeline, and then
choosing "create palette" from the palette menu. You can then "export" this
palette and attach it to your book from the book properties dialog box.
For best results, you may also want to "dither" your images to this new
optimized palette. The dithering process is described below in an
alternative procedure.
- Another option you could try, is to make your graphics 4 bit (16 color)
optimized images. This means that each graphic contains its 16 most
important colors. You would be surprised how nice your images can look, and
then each graphic only takes up 16 of the 256 slots allotted by windows. A
word or warning, this second option is not guaranteed to remove palette
flash, but it will allow you to have multiple images on the same page and
still have them look good.
You can reduce the colors of each of your graphics in BitEdit, by loading
it, selecting "Reduce colors" under the options menu, typing 16, then
clicking dither (if you just choose "accept", it will just best match the
colors). The graphic now has 16 colors, but it is still an 8 bit (256
colors allocated) graphic. To change it to a 4 bit graphic, choose "resize
image" from the Options menu in BitEdit, then click "4 bits per pixel".
When using either of these methods, remember that Windows really only allows
you to alter 236 colors, because 20 colors are used for the Windows system.
In addition, if you have solid colors enabled (book properties dialog box)
turned on, ToolBook reserves 96 colors for your drawing. This means that
your bitmaps can only use 160 different colors.
As I said earlier, palette management can be complicated and there are many
different methods of manipulating them. The better you understand palettes
the better you will be at managing them.
Good luck,
Raine Bergstrom
Asymetrix
Optimizing Palettes by Tim Schweizer
Step by step instructions.
Revised 10/30/95
Use Paint Shop Pro to Reduce the Number of Colors in Each Bitmap.
- Open Paint Shop Pro.
- Open the file containing the bitmap.
- Under Colors, select Count Colors Used to get an idea how many colors the
bitmap is using. You may be shocked!
- Under Colors, select Decrease Color Depth, select the "X" colors option
so you can specify the number of colors yourself.
- Use 100 colors for the Palette selection and select Error Diffusion for
the Reduction Method. (These settings work well for me; you can try other
options and setting if you wish.)
- Select OK -- your file is now using only 100 colors.
- Use File Save As to save the new file under a new name. Be sure you save
the file in the correct directory. Paint Shop Pro has a tendency to default
to directories used in previous saves, rather than the directory from which
you opened the image. Note: Make sure you use a new file name -- you do not
want to save the new file over your original file. You may need to go back
and use the original file again.
- Repeat the process above for each bitmap that will be sharing the same
page, appearing in the same book, etc.
- Exit or close Paint Shop Pro.
Use Digital Video Producer (DVP) to Create an Optimal Palette.
- Open DVP
- Select File, Import Media (or click on the Import Media icon).
- Import each of your bitmaps (all of the bitmaps that will be sharing the
same page, book, etc.)
- Drop each bitmap onto the Video A timeline, so that all of the bitmaps
are on the Video A timeline.
- Under Palette, select Create Optimal Palette.
- Select Whole Video.
- Select OK -- DVP will create a palette that is optimal (the best "shared"
color palette).
- At this point, the optimal palette is pasted to the clipboard. However,
save the palette so you can access it later (it also helps out just in case
you accidentally empty the clipboard). Under Palette, select Save Palette
As, and select a filename (it will have a .pal extension) and destination
directory where you want to save your palette file.
- Exit or close DVP (close the application using File, Exit). If you want,
you may save your current DVP project. It won't effect the outcome either
way. The DVP project files (.prj extensions) store the settings you were
using, the files you had imported, etc., as a project. It has nothing to do
with the files you just created. If you think you will be rebuilding the
same project, you should consider saving it as a DVP project just to save
you time later. Otherwise, do not bother saving the DVP project file.
Applying the Optimal Palette to the Bitmaps.
- The optimal palette is still on the clip board. You also saved it as a
.pal file.
- Open your MTB 3.0 CBT Edition group window.
- Open BitEdit
- Once in BitEdit, open each bitmap (choose File, Open From File, change
the List of Files Type to Bitmap, and select your file)
- Under Edit, choose Paste Palette (the palette is still on the clip board)
- Chose File, Save As File, and select a new name for your file (it will
have a .dib extension -- Microsoft Windows DIB format -- dib stands for
device independent bitmap). Be sure you save the file in the correct
directory. Make sure you use a new file name.
- Repeat the process above for each bitmap to apply the optimal palette to
each bitmap that will be sharing the same page, appearing in the same book, etc.
- Close BitEdit.
Applying the Optimal Palette to the Book (or page, etc.).
- Open MTB 3.0 CBT Edition.
- Open the latest version of your book.
- Under Object, choose Book Properties.
- Make sure the Solid Colors Enabled is not checked (set to false). Why? Of
the 256 colors in Windows, you can only alter 236 colors. Windows "keeps" 20
colors for the Windows system. If you have the Solid Colors Enabled checked
(turned on or set to true), MTB reserves 96 colors (these include the 20
Windows system colors) for your drawing graphics. That would mean that your
bitmaps can only use 160 different colors.
- Apply the palette to your book. (Applying a palette to your book will
remove any chance of palette flashes.) You should still be in the Object,
Book Properties box. Select the Color Palette button. Select Import, and
then select the palette file (the one with the .pal extension) you saved in
DVP. Note: If you are nuts and love the Open Script language, you could
instead open the MTB Command Window and type:
palette of this book = "c:\nameofyourfilepath\yourcustompalette.pal"
or, if you have imported a palette previously as a resource, you can type:
palette of this book = palette "yourcustompaletteresourcename"
This comes in handy when you are assigning palettes to individual pages,
etc. At book level, it is probably easier to use the Object, Book
Properties, Color Palette approach outlined earlier.
Note: Here's the bad news. Some of your bitmaps were probably already
imported into your book (Using File, Import Graphic). Sorry, you will need
delete those bitmaps and re-import the new bitmaps. The new bitmaps have
only 100 colors and they have the different (optimal) color palette.
Note: More bad news. Some of your bitmaps are probably referenced as clips,
rather than imported directly into your book. Sorry, you will need to open
Clip Manager, select each Clip, select Edit, and edit the Source (select the
Choose button). Make sure the correct bitmap (the new one with the new name
with reduced colors and the optimal palette) is now being used.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Tim Schweizer, Ph.D. + Associate Professor of Management
Internet: schweizt@luther.edu + Department of Economics & Business
Phone: 319-387-1131 + Luther College
FAX: 319-387-1088 + Decorah, IA 52101-1045 USA
"Where there is no vision, the people perish." Proverbs 29:18(a) KJV
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Revised 11/2/95
brianp@u.washington.edu
(Brian Parkhurst)
University of Washington
Box 357260
Seattle, WA 98195-7260
206/543-9175