blob: 4508b68710b2db988800f47cc8237b4389d87b7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#ifndef __IMAGE_H__
#define __IMAGE_H__
#include <Buffer.h>
#include <generic.h>
#include <Color.h>
enum {
FORMAT_TGA_BASIC,
FORMAT_JPEG,
};
class Image : public Buffer {
public:
Image(unsigned int width, unsigned int height);
virtual ~Image();
Color GetPixel(unsigned int, unsigned int) const;
unsigned char * GetBuffer();
void SetPixel(unsigned int, unsigned int, Color);
bool Prepare(unsigned int = FORMAT_TGA_BASIC) throw (GeneralException);
void Fill(Color = Color(0, 0, 0));
virtual String GetName() const;
virtual bool CanWrite() const;
bool SupportsFormat(unsigned int);
private:
unsigned int x, y;
bool r;
Color * img;
};
#endif
|