-
Notifications
You must be signed in to change notification settings - Fork 141
Expand file tree
/
Copy pathtkBitmap.h
More file actions
69 lines (58 loc) · 1.61 KB
/
tkBitmap.h
File metadata and controls
69 lines (58 loc) · 1.61 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// tkBitmap.h: Definition of the tkBitmap class
//
//////////////////////////////////////////////////////////////////////
#ifndef tkBitmap_h
#define tkBitmap_h
#include "colour.h"
#include <math.h>
/////////////////////////////////////////////////////////////////////////////
// tkBitmap
class tkBitmap
{
public:
tkBitmap();
~tkBitmap();
// ItkBitmap
public:
void setWidth(long w);
void setHeight(long h);
long getHeight();
long getWidth();
colour getValue( long Row, long Column );
bool setValue( long Row, long Column, colour Value );
void getRow( long Row, long * result );
bool Open(CStringW FileName, colour *& ImageData);
bool Open(CStringW FileName);
bool CreateBitmap(CStringW bmp_file, const colour * ImageData);
bool WriteBitmap(CStringW bmp_file, const colour * ImageData);
bool WriteDiskToDisk(const char * SourceFile, const char * DestinationFile);
void Close();
long FileHandle();
private:
//Buffering Variables
void bufferRows( long centerRow );
long currentRow;
colour * rowOne;
colour * rowTwo;
colour * rowThree;
//Don't keep this Very large chunk of memory around for the
//rare case in which it's used briefly to remove the pad from a 24-bit
//bitmap.
//CGOH BYTE * BitmapBits;
int sizeMap;
long cols;
long rows;
// Chris M May 2006 -- Is this file currently opened in write mode?
bool writable;
CStringW bmpFileName;
public:
FILE * bmpfile;
BITMAPFILEHEADER bmfh;
BITMAPINFOHEADER bmif;
RGBQUAD * bmiColors;
int pad;
long begOfData;
ICallback * globalCallback;
BSTR key;
};
#endif // !defined tkBitmap_h