Hi,

I am writing a program to read a BMP image file.These are the things which i want the program to do:

1. Read an image file
2. extract the Height ,width,noof bits ,rasterinformation etc.
3. if noofbits is 24 i want it to split rasterdata to rgb components.
4. if noofbits is 8 i want it to read the colortable .
5.write an image file .

so this is the design i have in mind:
1. IMAGEINFO:-

This class will extract the filesize ,height ,width,noofbits
2. RGBCLASS:
This class will read the rasterdata in R,G,B format if the number of bits is 24.this will have related rgb conversion function.
3. Grayclass:
This will read data of colortable if the number of bits is 8, and also the rasterdata. when in case of rgb to gray conversion it will load the colortable information.

I am thinking of making IMAGEINFO as the base class and RGBCLASS and Grayclass as derived class.
Is this a good design. Need suggestion.
-swetha