-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cubetti.1
353 lines (353 loc) · 5.19 KB
/
Cubetti.1
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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
.\" Automatically generated by Pandoc 2.13
.\"
.TH "CUBETTI" "1" "March 2022" "" ""
.hy
.SH NAME
.PP
Cubetti - Creates a cube matrix with 6 photos.
.SH SYNOPSIS
.PP
\f[B]Cubetti\f[R] [options]* inputfiles
.SH DESCRIPTION
.PP
This program allows you to create a cube matrix with 6 photos.
.PD 0
.P
.PD
Each face of the cube has a portion of one of the six images.
.SH OPTIONS
.PP
\f[B]-r, \[en]rows=VALUE\f[R] :
.PD 0
.P
.PD
set the number of rows of the output matrix (
.PD 0
.P
.PD
default 2)
.PP
\f[B]-c, \[en]columns=VALUE\f[R] :
.PD 0
.P
.PD
set the number of columns of the output matrix (
.PD 0
.P
.PD
default 2)
.PP
\f[B]-s, \[en]size=VALUE\f[R] :
.PD 0
.P
.PD
set the size of each cube (default 50mm)
.PP
\f[B]\[en]paper=VALUE\f[R] :
.PD 0
.P
.PD
Output paper size:
.PD 0
.P
.PD
Large 20x27cm
.PD 0
.P
.PD
Medium (default) 15x20cm
.PD 0
.P
.PD
A4 210x297mm
.PP
\f[B]\[en]sample\f[R] :
.PD 0
.P
.PD
generate sample images
.PP
\f[B]\[en]fillcolor=VALUE\f[R] :
.PD 0
.P
.PD
set the color used to fill the images
.PD 0
.P
.PD
(default #FFFFFF)
.PP
\f[B]\[en]bordercolor=VALUE\f[R] :
.PD 0
.P
.PD
set the color used to border the images
.PD 0
.P
.PD
(default #000000)
.PP
\f[B]\[en]dpi=VALUE\f[R] :
.PD 0
.P
.PD
set output resolution (default 300)
.PP
\f[B]\[en]json=VALUE\f[R] :
.PD 0
.P
.PD
parameters in json format,
.PD 0
.P
.PD
use \[en]helpjson for sample template
.PD 0
.P
.PD
Text can be stored in a file instead of a string
.PD 0
.P
.PD
The file must be referenced as `\[at]filename'
.PP
\f[B]\[en]script=VALUE\f[R] :
.PD 0
.P
.PD
c# script for custom processing,
.PD 0
.P
.PD
use \[en]helpscript for sample template
.PD 0
.P
.PD
Text can be stored in a file instead of a string
.PD 0
.P
.PD
The file must be referenced as `\[at]filename'
.PP
\f[B]-o, \[en]output=VALUE\f[R] :
.PD 0
.P
.PD
set output dir/filename
.PP
\f[B]\[en]extension=VALUE\f[R] :
.PD 0
.P
.PD
file extension for output file (default `jpg')
.PP
\f[B]\[en]tag=VALUE\f[R] :
.PD 0
.P
.PD
extra info for user scripts
.PD 0
.P
.PD
Text can be stored in a file instead of a string
.PD 0
.P
.PD
The file must be referenced as `\[at]filename'
.PP
\f[B]\[en]nobanner\f[R] :
.PD 0
.P
.PD
suppress the banner
.PP
\f[B]-h, \[en]help\f[R] :
.PD 0
.P
.PD
show this message and exit
.PP
\f[B]\[en]helpjson\f[R] :
.PD 0
.P
.PD
show json parameters template
.PP
\f[B]\[en]helpscript\f[R] :
.PD 0
.P
.PD
show script template
.PP
\f[B]\[en]man\f[R] :
.PD 0
.P
.PD
show the man page source and exit
.PP
\f[B]\[en]colors\f[R] :
.PD 0
.P
.PD
list available colors by name
.PP
\f[B]\[en]license\f[R] :
.PD 0
.P
.PD
show program license (AGPL 3.0)
.SS COLORS
.PP
Colors can be written in any of these formats:
.PD 0
.P
.PD
#rgb
.PD 0
.P
.PD
#rrggbb
.PD 0
.P
.PD
#rrggbbaa
.PD 0
.P
.PD
#rrrrggggbbbb
.PD 0
.P
.PD
#rrrrggggbbbbaaaa
.PD 0
.P
.PD
colorname (use Cubetti \[en]colors to see all available colors)
.SS JSON
.PP
Parameters can also be passed with a json formatted string
.PD 0
.P
.PD
using the following template:
.IP
.nf
\f[C]
{
\[dq]Rows\[dq]: 2,
\[dq]Columns\[dq]: 3,
\[dq]Size\[dq]: 50,
\[dq]Paper\[dq]: null,
\[dq]FillColor\[dq]: \[dq]#FFFFFF\[dq],
\[dq]BorderColor\[dq]: \[dq]#000000\[dq],
\[dq]Dpi\[dq]: 300,
\[dq]OutputName\[dq]: \[dq]\[dq],
\[dq]Extension\[dq]: \[dq]jpg\[dq],
\[dq]Script\[dq]: null,
\[dq]Tag\[dq]: null,
\[dq]FilesList\[dq]: []
}
\f[R]
.fi
.SS ENVIRONMENT VARIABLES
.PP
The program can read values from these variables:
.PD 0
.P
.PD
CDV_OUTPATH Base path for output files
.PD 0
.P
.PD
CDV_DPI Resolution for output files
.PD 0
.P
.PD
CDV_FILL Color used to fill images
.PD 0
.P
.PD
CDV_BORDER Border color
.SH SCRIPTING
.PP
You can add custom c# code, compiled at runtime, with the \[en]script
parameter.
You can call a property \f[I]engine\f[R] that exposes all the parameters
passed to the main program.
.PP
The following using are declared:
.PD 0
.P
.PD
\[ti]\[ti]\[ti]
.PP
using Casasoft.CCDV; using Casasoft.CCDV.Engines; using
Casasoft.CCDV.JSON; using ImageMagick; using System; using
System.Collections.Generic; using System.IO; using System.Linq;
.IP
.nf
\f[C]
These are the signatures of the scriptable methods:
\f[R]
.fi
.PP
// Script template for Cubetti
///
/// Custom class initialization ///
.PP
public void Init() { }
///
/// Image for final output ///
.PP
/// public MagickImage OutputImage() => null;
///
/// Preprocesses the loaded image ///
.PP
/// The loaded image /// The Processed image public MagickImage
ProcessOnLoad(MagickImage image) => image; \[ti]\[ti]\[ti]
.SH COPYRIGHT
.PP
Casasoft Cubetti is free software:
.PD 0
.P
.PD
you can redistribute it and/or modify it
.PD 0
.P
.PD
under the terms of the GNU Affero General Public License as published by
.PD 0
.P
.PD
the Free Software Foundation, either version 3 of the License, or
.PD 0
.P
.PD
(at your option) any later version.
.PP
You should have received a copy of the GNU AGPL v.3
.PD 0
.P
.PD
along with Casasoft Cubetti.
.PD 0
.P
.PD
If not, see <http://www.gnu.org/licenses/>.
.SH DISCLAIMER
.PP
Casasoft Cubetti is distributed in the hope that it will be useful,
.PD 0
.P
.PD
but WITHOUT ANY WARRANTY; without even the implied warranty of
.PD 0
.P
.PD
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.PD 0
.P
.PD
See the GNU General Public License for more details.
.SH AUTHORS
Roberto Ceccarelli - Casasoft.