Skip to Main Content
Windows Graphics Programming Win32 GDI and DirectDraw®
book

Windows Graphics Programming Win32 GDI and DirectDraw®

by Feng Yuan
December 2000
Intermediate to advanced content levelIntermediate to advanced
1280 pages
28h 56m
English
Pearson
Content preview from Windows Graphics Programming Win32 GDI and DirectDraw®

Chapter 13. Palettes

Up to this chapter, we have been using lots of colors in our programs; we talked about color pens, color brushes, 16-, 24-, and 32-bit bitmaps, gradient fill, alpha blending, and image processing. But if we run these programs on a 256-color display monitor, suddenly we go back to the dark ages. All the colorful displays turn grayish with ugly dithering patterns.

The problem lies in the palette, a tool that Windows GDI and display hardware borrowed from graphics artists to map the color index in a palette-based frame buffer to RGB colors.

In this chapter, we discuss what happens if you don't pay attention to the palette at all, what's the least you should do if you want your program to run reasonably well on palette-based displays, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C++ Windows Programming

C++ Windows Programming

Stefan Bjornander

Publisher Resources

ISBN: 0130869856Purchase book