Image Processing

Fastgraph includes a suite of image processing functions for four popular image transforms: photo-inversion, grayscale, gamma correction, and contrast enhancement. Each of these transforms is considered a one-to-one transform, since each transformed pixel value is strictly a function of the original pixel at that same position. You can apply these transforms to a direct color bitmap and store the transformed image in another direct color bitmap, apply the transforms directly to a rectangular subset of the active virtual buffer, or apply the transforms to a series of RGB color triples.

Fastgraph also provides functions for alpha blending, which is the process of producing a blended color by combining a translucent foreground color with a background color. Alpha blending can be useful for morphing one image into another, or for simulating environmental conditions such as fog or smoke. Unlike the four image transforms described above, alpha blending is not a one-to-one transform because blended pixels are computed from two distinct foreground and background pixels. Fastgraph's alpha blending functions work on RGB color values, on direct color bitmaps, and on direct color virtual buffers.

The next sections will discuss the four one-to-one image transforms in order of complexity, along with the Fastgraph functions that perform these transforms. We'll then present a simple image processing program that illustrates several of these functions. Next we'll cover alpha blending and finish up with an example that shows alpha blending in action.

Next >>

Fastgraph Home Page


copyright 2001 Ted Gruber Software, Inc.