You are awesome... Some Frequently Asked Questions

How to I get RGB values from a binary image (GIF, JPG, etc.)?

GraphicConverter Method

To get RGB values from scanned images (GIF, PICT, or whatever) use the Macintosh program GraphicConverter and follow these steps:
  1. Use the "Save as..." option and select "ASCII" as the file format.
  2. Click on "Options..." and check the box marked "Add Width, Height and Number of Colors".
  3. Then click "Ok" and save the file.
  4. Three files will be created if there are more that 256 colors (one for Red, Green and Blue).
  5. You can then read the RGB values from these files with Microsoft Word or any other text file reader.
  6. The first two numbers of each of the ASCII files created will be the number of rows and columns, repectively. Each row of numbers after this corresponds to the each row of pixels in the original image.


Another way to do this is to use NetPBM Software - ppmtogif, giftoppm, etc. For example if your filename is filename.gif you could type the following on your UNIX account:
giftoppm filename.gif > temp.ppm
pnmnoraw temp.ppm > filename.ppm

The RGB values would them be in the file filename.ppm See CIE 1964 and 1931 xyz Spectra Tristimulus Values and Color Science for more information.

Back to Color Science