The resulting value is returned in bit 23 of the EDX register. At runtime, the program can decide which routine it should actually call. By default, this action terminates the program and generates a core file. An Image Brightening Program Let's suppose we have a gray-scale bitmap image, like the one in Figure 3. Each pixel is stored in one unsigned 8-bit byte contained in an array.
Smaller numbers represent darker tones of gray, while larger numbers represent brighter tones.
Numbers 0 and 255 represent the pure black and white colors, respectively. John Bradley's xv utility can easily be used under Linux to create and display this kind of bitmap image. Wraparound Arithmetic Unfortunately, we end up with the undesired image found in Figure 4. The result is 94 which produces a darker gray instead of a brighter one, causing the observable inversion effect. In this case, the saturation value is 255, which represents pure white.