# File - Import Image

Ribbon bar. Select the File tab and click Import Image to display the Open dialog box. Or, select the Home tab. In the File group, click the Open arrow and from the menu, select Import Image to display the Open dialog box.

Classic menus. From the File menu, select Import Image to display the Open dialog box.

Browse to an image file and select it, and then click the Open button. STATISTICA will create a spreadsheet based on the image.

Each cell in the resultant spreadsheet represents a pixel, and the value of that cell is a decimal representation of that pixel's color. This process is called digitizing color to numbers. External programs can use this functionality to examine digitized images for patterns and systematic lines.

Note that, when importing certain types of images (e.g., .GIF, .JPG), the resulting RGB values may not exactly match the original image due to the way files are compressed. You will get better results with .BMP and .PNG files, as these contain true colors.

Digital Color Representation

Digital colors are a combination of three primary colors: red, green, and blue (RGB). Any color can be specified as an RGB triplet of intensity values, with each intensity ranging from 0 to 255, i.e.:

• Red: RGB (255, 0, 0)

• Green: RGB (0, 255, 0)

• Blue: RGB (0, 0, 255)

Similarly, a triplet RGB number can be converted to a single decimal number, i.e.:

• Red: 255*2560 + 0*2561 + 0*2562 = 255 + 0 + 0 = 255

• Green: 0*2560 + 255*2561 + 0*2562 = 0 + 65,280 + 0 = 65,280

• Blue: 0*2560 + 0*2561 + 255*2562 = 0 + 0 + 16,711,680 = 16,711,680

Example

Consider a 32x32 pixel image containing the colors red, green, blue, and white.

When you import primary.bmp from the Examples/Datasets folder in STATISTICA, a 32v by 32c spreadsheet (1 cell per 1 pixel) will be displayed with the following values:

Upper right quadrant: Red = RGB (255, 0, 0) = 255

Upper left quadrant: Green = RGB (0, 255, 0) = 65,280

Lower right quadrant: Blue = RGB (0, 0, 255) = 16,711,680

Lower left quadrant: White = RGB (255, 255, 255) = 16,777,215