Lines 1-156
Link Here
|
1 |
*** images.c.orig Sun May 31 08:06:53 1998 |
1 |
--- images.c.orig Sun May 31 15:06:53 1998 |
2 |
--- images.c Thu Jan 6 11:30:16 2000 |
2 |
+++ images.c Sat May 29 18:08:54 2004 |
3 |
*************** |
3 |
@@ -196,7 +196,7 @@ |
4 |
*** 196,202 **** |
4 |
basey+(rangey/2), "No hits for this month!", black); |
5 |
basey+(rangey/2), "No hits for this month!", black); |
5 |
gdImageInterlace(im, 1); /* make it interlaced */ |
6 |
gdImageInterlace(im, 1); /* make it interlaced */ |
6 |
if ((out = fopen(name, "wb")) != NULL) { |
7 |
if ((out = fopen(name, "wb")) != NULL) { |
7 |
- gdImageGif(im, out); |
8 |
! gdImageGif(im, out); |
8 |
+ gdImagePng(im, out); |
9 |
(void) fclose(out); |
9 |
(void) fclose(out); |
10 |
} |
10 |
} |
11 |
gdImageDestroy(im); |
11 |
gdImageDestroy(im); |
12 |
--- 196,202 ---- |
12 |
@@ -286,7 +286,7 @@ |
13 |
basey+(rangey/2), "No hits for this month!", black); |
13 |
|
14 |
gdImageInterlace(im, 1); /* make it interlaced */ |
14 |
gdImageInterlace(im, 1); /* make it interlaced */ |
15 |
if ((out = fopen(name, "wb")) != NULL) { |
15 |
if ((out = fopen(name, "wb")) != NULL) { |
16 |
! gdImagePng(im, out); |
16 |
- gdImageGif(im, out); |
17 |
(void) fclose(out); |
17 |
+ gdImagePng(im, out); |
18 |
} |
18 |
(void) fclose(out); |
19 |
gdImageDestroy(im); |
19 |
} |
20 |
*************** |
20 |
gdImageDestroy(im); |
21 |
*** 286,292 **** |
21 |
@@ -441,7 +441,7 @@ |
22 |
|
22 |
|
23 |
gdImageInterlace(im, 1); /* make it interlaced */ |
23 |
gdImageInterlace(im, 1); /* make it interlaced */ |
24 |
if ((out = fopen(name, "wb")) != NULL) { |
24 |
if ((out = fopen(name, "wb")) != NULL) { |
25 |
! gdImageGif(im, out); |
25 |
- gdImageGif(im, out); |
26 |
(void) fclose(out); |
26 |
+ gdImagePng(im, out); |
27 |
} |
27 |
(void) fclose(out); |
28 |
gdImageDestroy(im); |
28 |
} |
29 |
--- 286,292 ---- |
29 |
gdImageDestroy(im); |
30 |
|
30 |
@@ -529,7 +529,7 @@ |
31 |
gdImageInterlace(im, 1); /* make it interlaced */ |
31 |
|
32 |
if ((out = fopen(name, "wb")) != NULL) { |
32 |
gdImageInterlace(im, 1); /* make it interlaced */ |
33 |
! gdImagePng(im, out); |
33 |
if ((out = fopen(name, "wb")) != NULL) { |
34 |
(void) fclose(out); |
34 |
- gdImageGif(im, out); |
35 |
} |
35 |
+ gdImagePng(im, out); |
36 |
gdImageDestroy(im); |
36 |
(void) fclose(out); |
37 |
*************** |
37 |
} |
38 |
*** 441,447 **** |
38 |
gdImageDestroy(im); |
39 |
|
39 |
@@ -666,7 +666,7 @@ |
40 |
gdImageInterlace(im, 1); /* make it interlaced */ |
40 |
gdImageInterlace(im, 1); /* make it interlaced */ |
41 |
if ((out = fopen(name, "wb")) != NULL) { |
41 |
gdImageInterlace(im, 1); /* make it interlaced */ |
42 |
! gdImageGif(im, out); |
42 |
if ((out = fopen(name, "wb")) != NULL) { |
43 |
(void) fclose(out); |
43 |
- gdImageGif(im, out); |
44 |
} |
44 |
+ gdImagePng(im, out); |
45 |
gdImageDestroy(im); |
45 |
(void) fclose(out); |
46 |
--- 441,447 ---- |
46 |
} |
47 |
|
47 |
gdImageDestroy(im); |
48 |
gdImageInterlace(im, 1); /* make it interlaced */ |
48 |
@@ -752,7 +752,7 @@ |
49 |
if ((out = fopen(name, "wb")) != NULL) { |
49 |
|
50 |
! gdImagePng(im, out); |
50 |
gdImageInterlace(im, 1); /* make it interlaced */ |
51 |
(void) fclose(out); |
51 |
if ((out = fopen(name, "wb")) != NULL) { |
52 |
} |
52 |
- gdImageGif(im, out); |
53 |
gdImageDestroy(im); |
53 |
+ gdImagePng(im, out); |
54 |
*************** |
54 |
(void) fclose(out); |
55 |
*** 529,535 **** |
55 |
} |
56 |
|
56 |
gdImageDestroy(im); |
57 |
gdImageInterlace(im, 1); /* make it interlaced */ |
57 |
@@ -988,7 +988,7 @@ |
58 |
if ((out = fopen(name, "wb")) != NULL) { |
58 |
|
59 |
! gdImageGif(im, out); |
59 |
gdImageInterlace(im, 1); /* make it interlaced */ |
60 |
(void) fclose(out); |
60 |
if ((out = fopen(name, "wb")) != NULL) { |
61 |
} |
61 |
- gdImageGif(im, out); |
62 |
gdImageDestroy(im); |
62 |
+ gdImagePng(im, out); |
63 |
--- 529,535 ---- |
63 |
(void) fclose(out); |
64 |
|
64 |
} |
65 |
gdImageInterlace(im, 1); /* make it interlaced */ |
65 |
gdImageDestroy(im); |
66 |
if ((out = fopen(name, "wb")) != NULL) { |
66 |
@@ -996,37 +996,37 @@ |
67 |
! gdImagePng(im, out); |
67 |
} |
68 |
(void) fclose(out); |
68 |
|
69 |
} |
69 |
ICON_TAB icon_tab[] = { |
70 |
gdImageDestroy(im); |
70 |
- { "btn/sq_green.gif", 0, 204, 0 }, |
71 |
*************** |
71 |
- { "btn/sq_blue.gif", 0, 0, 255 }, |
72 |
*** 666,672 **** |
72 |
- { "btn/sq_red.gif", 255, 0, 0 }, |
73 |
gdImageInterlace(im, 1); /* make it interlaced */ |
73 |
- { "btn/sq_orange.gif", 222, 102, 0 }, |
74 |
gdImageInterlace(im, 1); /* make it interlaced */ |
74 |
- { "btn/sq_yellow.gif", 242, 242, 0 }, |
75 |
if ((out = fopen(name, "wb")) != NULL) { |
75 |
- { "btn/sq_magenta.gif", 153, 0, 255 }, |
76 |
! gdImageGif(im, out); |
76 |
- { "btn/sq_grey.gif", 204, 204, 204 } |
77 |
(void) fclose(out); |
77 |
+ { "btn/sq_green.png", 0, 204, 0 }, |
78 |
} |
78 |
+ { "btn/sq_blue.png", 0, 0, 255 }, |
79 |
gdImageDestroy(im); |
79 |
+ { "btn/sq_red.png", 255, 0, 0 }, |
80 |
--- 666,672 ---- |
80 |
+ { "btn/sq_orange.png", 222, 102, 0 }, |
81 |
gdImageInterlace(im, 1); /* make it interlaced */ |
81 |
+ { "btn/sq_yellow.png", 242, 242, 0 }, |
82 |
gdImageInterlace(im, 1); /* make it interlaced */ |
82 |
+ { "btn/sq_magenta.png", 153, 0, 255 }, |
83 |
if ((out = fopen(name, "wb")) != NULL) { |
83 |
+ { "btn/sq_grey.png", 204, 204, 204 } |
84 |
! gdImagePng(im, out); |
84 |
}; |
85 |
(void) fclose(out); |
85 |
|
86 |
} |
86 |
BTN_TAB buttons[] = { /* various images */ |
87 |
gdImageDestroy(im); |
87 |
- { "btn/netstore_sw.gif", "Netstore", 0, 0 }, |
88 |
*************** |
88 |
- { "btn/netstore_sb.gif", "Netstore", 0, 0 }, |
89 |
*** 752,758 **** |
89 |
- { "btn/RAG_sw.gif", NULL, 0, 0 }, |
90 |
|
90 |
- { "btn/RAG_sb.gif", NULL, 0, 0 }, |
91 |
gdImageInterlace(im, 1); /* make it interlaced */ |
91 |
- { "btn/year_off.gif", "summary", 0, 0 }, |
92 |
if ((out = fopen(name, "wb")) != NULL) { |
92 |
- { "btn/totals_off.gif", "totals", 0, 0 }, |
93 |
! gdImageGif(im, out); |
93 |
- { "btn/days_off.gif", "days", 0, 0 }, |
94 |
(void) fclose(out); |
94 |
+ { "btn/netstore_sw.png", "Netstore", 0, 0 }, |
95 |
} |
95 |
+ { "btn/netstore_sb.png", "Netstore", 0, 0 }, |
96 |
gdImageDestroy(im); |
96 |
+ { "btn/RAG_sw.png", NULL, 0, 0 }, |
97 |
--- 752,758 ---- |
97 |
+ { "btn/RAG_sb.png", NULL, 0, 0 }, |
98 |
|
98 |
+ { "btn/year_off.png", "summary", 0, 0 }, |
99 |
gdImageInterlace(im, 1); /* make it interlaced */ |
99 |
+ { "btn/totals_off.png", "totals", 0, 0 }, |
100 |
if ((out = fopen(name, "wb")) != NULL) { |
100 |
+ { "btn/days_off.png", "days", 0, 0 }, |
101 |
! gdImagePng(im, out); |
101 |
{ NULL, NULL, 0, 0 }, |
102 |
(void) fclose(out); |
102 |
{ NULL, NULL, 0, 0 }, |
103 |
} |
103 |
- { "btn/avload_off.gif", "avload", 0, 0 }, |
104 |
gdImageDestroy(im); |
104 |
- { "btn/topurl_off.gif", "topurl", 0, 0 }, |
105 |
*************** |
105 |
- { "btn/topdom_off.gif", "topdom", 0, 0 }, |
106 |
*** 988,994 **** |
106 |
- { "btn/topuag_off.gif", "topuag", 0, 0 }, |
107 |
|
107 |
- { "btn/topref_off.gif", "topref", 0, 0 }, |
108 |
gdImageInterlace(im, 1); /* make it interlaced */ |
108 |
- { "btn/cntry_off.gif", "country", 0, 0 }, |
109 |
if ((out = fopen(name, "wb")) != NULL) { |
109 |
- { "btn/files_off.gif", "files", 0, 0 }, |
110 |
! gdImageGif(im, out); |
110 |
- { "btn/rfiles_off.gif", "rfiles", 0, 0 }, |
111 |
(void) fclose(out); |
111 |
- { "btn/sites_off.gif", "sites", 0, 0 }, |
112 |
} |
112 |
- { "btn/rsites_off.gif", "rsites", 0, 0 }, |
113 |
gdImageDestroy(im); |
113 |
- { "btn/agents_off.gif", "agents", 0, 0 }, |
114 |
--- 988,994 ---- |
114 |
- { "btn/refers_off.gif", "refers", 0, 0 } |
115 |
|
115 |
+ { "btn/avload_off.png", "avload", 0, 0 }, |
116 |
gdImageInterlace(im, 1); /* make it interlaced */ |
116 |
+ { "btn/topurl_off.png", "topurl", 0, 0 }, |
117 |
if ((out = fopen(name, "wb")) != NULL) { |
117 |
+ { "btn/topdom_off.png", "topdom", 0, 0 }, |
118 |
! gdImagePng(im, out); |
118 |
+ { "btn/topuag_off.png", "topuag", 0, 0 }, |
119 |
(void) fclose(out); |
119 |
+ { "btn/topref_off.png", "topref", 0, 0 }, |
120 |
} |
120 |
+ { "btn/cntry_off.png", "country", 0, 0 }, |
121 |
gdImageDestroy(im); |
121 |
+ { "btn/files_off.png", "files", 0, 0 }, |
122 |
*************** |
122 |
+ { "btn/rfiles_off.png", "rfiles", 0, 0 }, |
123 |
*** 1037,1043 **** |
123 |
+ { "btn/sites_off.png", "sites", 0, 0 }, |
124 |
(void) gdImageColorAllocate(im, tp->color[0], tp->color[1], tp->color[2]); |
124 |
+ { "btn/rsites_off.png", "rsites", 0, 0 }, |
125 |
gdImageInterlace(im, 1); |
125 |
+ { "btn/agents_off.png", "agents", 0, 0 }, |
126 |
if ((out=fopen(fname, "wb")) != NULL) { |
126 |
+ { "btn/refers_off.png", "refers", 0, 0 } |
127 |
! gdImageGif(im, out); |
127 |
}; |
128 |
(void) fclose(out); |
128 |
|
129 |
} |
129 |
static void mkIcon(char * const fname, ICON_TAB * const tp) { |
130 |
gdImageDestroy(im); |
130 |
@@ -1037,7 +1037,7 @@ |
131 |
--- 1037,1043 ---- |
131 |
(void) gdImageColorAllocate(im, tp->color[0], tp->color[1], tp->color[2]); |
132 |
(void) gdImageColorAllocate(im, tp->color[0], tp->color[1], tp->color[2]); |
132 |
gdImageInterlace(im, 1); |
133 |
gdImageInterlace(im, 1); |
133 |
if ((out=fopen(fname, "wb")) != NULL) { |
134 |
if ((out=fopen(fname, "wb")) != NULL) { |
134 |
- gdImageGif(im, out); |
135 |
! gdImagePng(im, out); |
135 |
+ gdImagePng(im, out); |
136 |
(void) fclose(out); |
136 |
(void) fclose(out); |
137 |
} |
137 |
} |
138 |
gdImageDestroy(im); |
138 |
gdImageDestroy(im); |
139 |
*************** |
139 |
@@ -1071,7 +1071,7 @@ |
140 |
*** 1071,1077 **** |
140 |
if (!buttons[idx].name) |
141 |
if (!buttons[idx].name) |
141 |
continue; |
142 |
continue; |
142 |
if ((fp = fopen(buttons[idx].name, "rb")) != NULL) { |
143 |
if ((fp = fopen(buttons[idx].name, "rb")) != NULL) { |
143 |
- ip = gdImageCreateFromGif(fp); |
144 |
! ip = gdImageCreateFromGif(fp); |
144 |
+ ip = gdImageCreateFromPng(fp); |
145 |
(void) fclose(fp); |
145 |
(void) fclose(fp); |
146 |
buttons[idx].wid = gdImageSX(ip); |
146 |
buttons[idx].wid = gdImageSX(ip); |
147 |
buttons[idx].ht = gdImageSY(ip); |
147 |
buttons[idx].ht = gdImageSY(ip); |
148 |
--- 1071,1077 ---- |
|
|
149 |
if (!buttons[idx].name) |
150 |
continue; |
151 |
if ((fp = fopen(buttons[idx].name, "rb")) != NULL) { |
152 |
! ip = gdImageCreateFromPng(fp); |
153 |
(void) fclose(fp); |
154 |
buttons[idx].wid = gdImageSX(ip); |
155 |
buttons[idx].ht = gdImageSY(ip); |
156 |
|