@fuze365
“I have some experience programming but haven't really worked with images before. I have no idea where to start.”
I would have to make some assumptions as to what you require. The first assumption being that this is a one off assignment that is not going to be developed over time in your course.
When you say you have no idea where to start, do you mean in general or with regards to images? In general start with the Image class, with images start with the data structure.
I will assume that you will want a simple colour space [cs], so something like RGB.
1 2 3 4 5 6 7
|
typedef unsigned char UBYTE1 ;
struct Color
{
UBYTE1 blue ;
UBYTE1 green ;
UBYTE1 red ;
};
| |
Logically your image data will be a 2D array of Colors, but the physical representation will depend on things like will you have a fixed size image, Do you want to keep it simple and index with [x][y] or have a big chunk of memory and play with pointer?
Anyway, your image class will need methods for getting and setting colours at x,y coordinates for your GeometricObjects to call to ‘draw’ on your image.
For info on PNG, try the following two resources (they may scare you a bit, but I’m assuming you will not need to do a full implementation).
http://www.faqs.org/ftp/rfc/pdf/rfc2083.txt.pdf
http://www.w3.org/TR/PNG/
[cs] http://en.wikipedia.org/wiki/Color_space
Hope that helps.