-
Notifications
You must be signed in to change notification settings - Fork 1
/
GimConv.cfg
247 lines (199 loc) · 5.42 KB
/
GimConv.cfg
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
//================================================================
// gimconv configuration
//================================================================
// configuration modified by ZiNgA BuRgA for use with Rcomage
// modifying this script may cause Rcomage not to function properly
// when performing GIM conversions (though I expect you know this
// already if you're looking at this file)
usage {
puts "usage:"
puts " gimconv <input files> [options]"
puts ""
puts "options:"
puts " -o <filename> specify output file name"
puts " -s <w,h> resize image data"
puts " -P resize image data to a power of two"
puts " -N output in normal (not faster) pixel storage format"
puts " -X swap RGBA <-> ABGR"
puts " -ps3 output ps3 style GIM"
puts " -bpp<n> color output bit depth; n is: 4, 8, 16, 16p, 16a or 32"
puts " 4, 8 are indexed; 16, 16a, 16p, 32 are RGBA format"
puts ""
puts " -S output text format"
puts " -interact input additional options"
puts " -pictures merge files as pictures"
puts " -frames merge files as frames"
puts " -levels merge files as levels"
puts " -prompt prompt always"
puts " -warning prompt on warning"
puts " -error prompt on error"
}
//----------------------------------------------------------------
// default settings
//----------------------------------------------------------------
default {
load "lib/*"
// main control
interact_mode = off // off on ctrl
merge_mode = off // off picture frame level plane
// image palette sequence
prompt_mode = off // off on warning error
output_object = on // off on
output_script = off // off on
output_directory = auto // current input auto
output_filename = ""
object_extension = .gim
script_extension = .gis
userdata_extension = .dat
glob_extension = .dds .tm2 .tga .bmp .avi
object_viewer = ""
// process control
filter_script = "Filter"
image_size = default // default pow2 $w,$h
pixel_order = faster // default normal faster
pixel_alpha = default // default $alpha
pixel_channel = default // default rgba rgab ragb ... etc
image_format = default // default rgba8888 rgba4444 rgba5551 rgba5650
// index4 index8 index16 index32
// dxt1 dxt3 dxt5 dxt1ext dxt3ext dxt5ext
palette_format = default // default rgba8888 rgba4444 rgba5551 rgba5650
update_userdata = default // default off on
update_fileinfo = off // default off on
check_limit = on // off on
limit_image_width = 512 // off $count
limit_image_height = 512 // off $count
limit_level_count = 8 // off $count
limit_frame_count = off // off $count
// output control
format_style = psp // std psp ps3
format_endian = little // little big
output_image = on // off on
output_palette = on // off on
output_sequence = off // off on
extend_edge = off
}
//--------------------------------------------------------
// format specific
//--------------------------------------------------------
input *.avi {
pixel_alpha = 255
}
input *.bmp {
pixel_alpha = 255
}
input *.dds {
}
input *.tga {
}
input *.tm2 {
}
input *.gim {
}
input *.gis {
}
//--------------------------------------------------------
// mode option
//--------------------------------------------------------
option -interact {
interact_mode = on
}
option -pictures {
merge_mode = picture
}
option -frames {
merge_mode = frame
}
option -levels {
merge_mode = level
}
option -planes {
merge_mode = plane
}
option -images {
merge_mode = image
}
option -palettes {
merge_mode = palette
}
option -sequences {
merge_mode = sequence
}
option -prompt {
prompt_mode = on
}
option -warning {
prompt_mode = warning
}
option -error {
prompt_mode = error
}
//--------------------------------------------------------
// process option
//--------------------------------------------------------
option -o %filename {
output_filename = %filename
}
option -s %size {
image_size = %size
}
option -g %ext {
glob_extension = %ext
}
option -P {
image_size = pow2
}
option -N {
pixel_order = normal
}
option -ps3 {
format_style = ps3
format_endian = big
}
option -bpp4 {
image_format = index4
}
option -bpp8 {
image_format = index8
}
option -bpp16 {
image_format = rgba5551
}
option -bpp16a {
image_format = rgba4444
}
option -bpp16p {
image_format = rgba5650
}
option -bpp32 {
image_format = rgba8888
}
//--------------------------------------------------------
// PS3 OSD specific options
//--------------------------------------------------------
option -X {
pixel_channel = abgr
}
option -E {
extend_edge = on
}
//--------------------------------------------------------
// output option
//--------------------------------------------------------
option -S {
output_object = off
output_script = on
}
//--------------------------------------------------------
// filter script
//--------------------------------------------------------
script Filter %target {
RescaleImage %target $image_size
SetPixelFormat %target $image_format $palette_format
SetPixelAlpha %target $pixel_alpha
SwapPixelChannel %target $pixel_channel
ConfigureImage %target order $pixel_order
UpdateUserData %target $update_userdata
UpdateFileInfo %target $update_fileinfo
ExtendEdge %target $extend_edge
CheckPSP %target $check_limit
}