Return to labs index
September 27, 2007 (Assignment #4 - Image Manipulation)
Due October 4, 2007 at 11:59PM(Thursday)

Files

Overview

This assignment asks you to manipulate the pixel array from a .bmp file. Specifically, you are asked to play with a 24-bit uncompressed .bmp image.

In order to keep the focus on manipulating arrays, points, and dynamic memory, you have been given libary functions that read in and write out the file. It should be noted that these will only work in little-endian machines, such as the intel-architecture unix.andrew maxhines. They will not work on big-endian machines, such as the iMacs.

You are given one example, the flip(), which flips the image and asked to implement the enlarge() function.

You are also asked to implement a simple program that allows the user to make use of both enlarge() and flip().

The Details

The details of the enlarge() method are contained in the comments within bmplib.c, as is the flip() example. You'll also want to pay careful attention to the pixel type defined within bmp.h.

Your main program should work as follows. It is important that it work exactly as follows, for example, it should take command-line arguments rather than be interactive.

bmptool enlarge {scale} | flip inputfile.bmp outputfile.bmp

We're Here To Help!

As always -- remember, we're here to help!