Select menu: File | Open
Use this to specify the format of a spreadsheet when an image file has been opened into a spreadsheet. Image files such as jpg, tiff, png formats can be opened into spreadsheets using the File | Open menu.
Sheet format for colour values
Vector with X,Y and single RGB column | A vector spreadsheet with 3 columns, where X contains the horizontal location of the pixel, Y contains the vertical location of the pixel, and RGB contains the colour of the pixel. RGB = 256*256*red + 256*green + blue |
Vector with X,Y, red, green and blue columns | A vector spreadsheet with 5 columns, where X contains the horizontal location of the pixel, Y contains the vertical location of the pixel, and red, blue and green contain the 3 colour components of the pixel. |
Matrix with RGB values | A matrix spreadsheet with the same number of rows and columns as the image, with each value in the matrix containing the RGB colour of the pixel. |
The following calculations show how to convert red, green and blue to RGB values in command mode using the CALCULATE directive:
CALCULATE rgb = RGB(red; green; blue)
CALCULATE red = RED(rgb)
CALCULATE green = GREEN(rgb)
CALCULATE blue = BLUE(rgb)
See also
- File Menu
- How to import or export data
- How to load data from files
- Supported file types
- Options when saving an image file from a spreadsheet
The IMPORT and EXPORT procedures can be used in the command language to load and save images in Genstat.