ECE222(2007Fall)Prog6(ArraysPointersAndStructures)

ECE222(2007Fall)Prog6(ArraysPointersAndStructures) - Fall...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Fall 2007 ECE 222 System Programming Concepts 1 of 3 Lab 6 – Arrays, Pointers, and Structures In this lab, each student is to write a menu-driven program called prog6.c that allows the user to process a bitmap file with a transformation matrix. Input The program should receive as command line arguments the name of the input file and the output file, which must be different. The input file is to be a 24-bit color bitmap image of the .bmp format. A 24-bit color .bmp file has two parts to its header describing the image file. The first header has the following structure: struct HEADER { unsigned short int Type; /* Magic identifier */ unsigned int Size; /* File size in bytes */ unsigned short int Reserved1, Reserved2; unsigned int Offset; /* Offset to data (in B) */ } Header; /* -- 14 Bytes -- */ The second part of the header has the following structure: struct INFOHEADER { unsigned int Size; /* Header size in bytes */ int Width, Height; /* Width / Height of image */ unsigned short int Planes; /* Number of colour planes */ unsigned short int Bits; /* Bits per pixel */ unsigned int Compression; /* Compression type */ unsigned int ImageSize;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

ECE222(2007Fall)Prog6(ArraysPointersAndStructures) - Fall...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online