Department of Mathematics

Math 300: Mathematical Computing

Image Formats

Images on the Web can be stored and transferred in a number of formats. All of these rely on the notion of a pixel - a picture element. Think of a pixel as one dot on your screen.

Bitmap Formats

Tagged Image File Format

Graphics Interchange Format

Portable Network Graphics

Joint Photographic Experts Group

Portable Bitmap Format



It is usually simple to convert from one image format to another. It is frequently necessary. Many programs do not save results in image formats, instead using postscript or another printer language. In that case we must convert to a reasonable compressed graphic format in order to display such information on the web. In this class, we will usually use the gimp to do that.

The gimp is the Gnu Image Manipulation Program. It is an open-software equivalent of Adobe Photoshop. To start it you may type "gimp" on a linux command line, or you may click Start->Graphics->The Gimp on a linux machine. Open an image by clicking the File -> Open menu. To save it in a different format, right-click the image, and select File->Save As. At the bottom of the dialog that results, type the name of the file in which you want to save the image, with the extension of the format you want, as seen above. Then just follow instructions. You may convert from any of the formats above to any other in this way.

As an alternative on Linux machines, one can use the convert command line utility. For example, to convert an existing JPEG image called myimage.jpg to PNG format, simply type the command

convert myimage.jpg myimage.png
on the Linux command line. This command invokes ghostscript and other utility programs to perform the conversion. This command has various options - see the man page for details.

The last test will take place at the final exam time on Tuesday, 12 December, from 1:30-3:30. It will be written as a one-hour (not 50 minute) exam, but you may have the full two hours for it. In other respects it will be very like the other tests, but comprehensive - it will emphasize Python, but cover all the topics we have seen. There is a Sample Exam, but be aware that things will have changed somewhat with the advent of ChatGPT.

Assignment A is posted.

Department of Mathematics, PO Box 643113, Neill Hall 103, Washington State University, Pullman WA 99164-3113, 509-335-3926, Contact Us
Copyright © 1996-2020 Kevin Cooper