blob: 55e96a58103fc28a6061a1551b324c6f65b7d2bb (
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
|
#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;
private:
unsigned int x, y;
bool r;
Color * img;
};
#endif
|