Raster images in openFrameworks
A raster image is a rectangular array of pixels. To keep things short, we will call a raster image an image.
Each pixel holds color information represented by one or several numerical values. This number of values is called a number of channels of the image. openFrameworks supports the images with one, three, and four numbers of channels:
- A one-channel image is called a grayscale image. Its pixels hold brightness values.
- A three-channel image is called a color image. Its pixels hold red, green, and blue components of the color.
- A four-channel image is called a color image with alpha channel. Its pixels have an additional component, alpha, controlling the transparency of the pixels.
openFrameworks supports loading from and saving images to all popular image file formats, including PNG, JPG, BMP, and TIFF.
There are three classes for working with images:
ofImage
: This is intended for manipulating the pixel values and drawing an imageofPixels
: This is intended for...