-
Notifications
You must be signed in to change notification settings - Fork 3
/
globals.cpp
executable file
·126 lines (110 loc) · 2.18 KB
/
globals.cpp
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#ifndef WIN32
void fopen_s(FILE** f,const char* filename, const char* mode);
#endif
void die(const char* error, ...);
void output(int level, const char* fmt, ...);
void* g_line0;
void* g_line1;
void* g_line2;
void* g_linet;
void* g_temp;
int* g_dither;
struct struct_indexed {
// int size;
// uint32 p;
uint32* pointer;
uint32* data;
uint32* rows;
// uint32* w;
// uint32* h;
};
struct struct_level {
void* data;
size_t offset;
int x0,y0; // inclusive minimum coordinates within this extended level
int x1,y1; // inclusive maximum coordinates within this extended level
int w,h;
int pitch;
};
struct GeoTIFFInfo {
double XGeoRef, YGeoRef;
double XCellRes, YCellRes;
double projection[16];
int nodata;
bool set;
};
struct struct_channel {
void* data;
char* filename;
FILE* f;
};
struct struct_image {
char filename[256];
uint16 bpp;
int width,height;
int xpos,ypos;
int top,left;
struct_channel* channels;
struct_indexed binary_mask;
struct_level* pyramid;
float** masks;
bool seampresent;
GeoTIFFInfo geotiff;
TIFF* tiff;
int tiff_width;
int tiff_height;
int tiff_u_height;
int first_strip;
int last_strip;
int cx;
int cy;
int d,dx;
};
int g_numthreads;
int g_numimages=0;
int g_workwidth=0;
int g_workheight=0;
int g_workbpp=0;
int g_workbpp_cmd=0;
int g_min_top=0;
int g_min_left=0;
double g_xres=-1;
double g_yres=-1;
int g_levels;
int g_max_levels=1000000;
int g_sub_levels=0;
int g_verbosity=1;
bool g_wideblend=false;
bool g_seamwarning=false;
bool g_simpleseam=false;
bool g_reverse=false;
bool g_pseudowrap=false;
bool g_swap=false;
bool g_save_out_pyramids=false;
bool g_dewhorl=false;
char* g_output_filename;
char* g_seamload_filename;
png_color* g_palette;
char* g_seamsave_filename;
char* g_xor_filename;
int g_numchannels=3;
void** g_out_channels;
TIFF* g_tiff;
FILE* g_jpeg;
int g_compression=-1;
int g_jpegquality=-1;
uint32* g_seams;
bool g_timing=false;
bool g_savemasks=false;
bool g_nooutput=false;
bool g_caching=false;
//void* g_cache;
size_t g_cache_bytes=0;
struct_level* g_output_pyramid;
bool g_crop=true;
bool g_debug=false;
bool g_nomask=false;
bool g_bigtiff=false;
bool g_bgr=false;
uint32* g_edt;
struct_image* g_images;