Supercomputer Applications
Graphics File Formats

Working with Graphics Files

azalea1.jpg There are a number of common graphics file formats that have been used to save image data. Usually, there is a "header" at the beginning of the file that contains information about the image such as file type and the dimensions for the graphic image. After that, the data telling what the graphic looks like is listed. For some file formats, the color data is given very clearly with RGB (red, green, blue) components clearly listed for color images, or just a single value representing the gray level for grayscale images. In other file types, the data is compressed and difficult to access.

The image displayed to the right is a copy of a watercolor painting done by this teacher, and will be used as a subject for various image processing functions presented here. It is in JPG format which does utilize compression.

Common File Formats Using Data Compression:

Common File Types Using No Compression:

Image Processing Techniques

There are anumber of interesting techniques that allow one to access the information in a graphics file, and then modify the data to view it differently. For this project, you will be expected to create your own image processing algorithm. You may need to read the data into a two-dimensional array, and then compare adjacent neighbors defore writing a character to disk. Everyone in the class should create their own image processing algorithm.

To compare the effects of just a few simple algorithms, take a look atthe following examples. These just require reading data from the original file, and then writing a new character into the output file.