Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Pixels, lines, and areas, as we discussed in the last three chapters, can be used to synthesize a financial chart, an engineering drawing, a textile pattern design, or a cartoon scene. Synthetic graphics programming follows precise mathematical formulas to use geometrical objects to build up a picture, similar to a graphic artist who uses brushes and paints to draw a picture on a canvas. This branch of computer graphics is often referred to as vector graphics, or line art. Another important branch of computer graphics deals with digitized images taken from the real world, which is called bitmap graphics.
An image is a rectangular array of picture elements, or pixels, each representing a color. Images are also referred to as sampled images, because they are often the results of finite digital sampling of a real-world scene, using a scanner, digital camera, or a video camera.
Windows operating systems choose to use the term bitmap instead of image, which is a word made from concatenating bit and map. This may hint at the black/ white original of Windows graphics programming, but the term bitmap is actually used to refer to generic images.
The topic of bitmaps is too big for a single chapter, so we divide it into three chapters. This chapter is going to discuss image data format, displaying images onto a graphics device. We will cover three different bitmap formats supported by GDI: DIB (device-independent bitmap), DIB section, and DDB (device-dependent bitmap). In the next chapters, we will discuss how to display bitmaps transparently, blend alpha with background, fade bitmap to darkness, lighten up bitmap, rotate bitmap, do image processing, etc.