use proper inclusive ranges for help
This commit is contained in:
parent
3580927a84
commit
e901f29cf7
2 changed files with 18 additions and 18 deletions
18
README.md
18
README.md
|
@ -29,31 +29,31 @@ resynth produces [tiling images like those seen here.][examples]
|
||||||
usage:
|
usage:
|
||||||
-a --autism
|
-a --autism
|
||||||
sensitivity to outliers
|
sensitivity to outliers
|
||||||
range: (0,256); default: 32
|
range: [0,256]; default: 32
|
||||||
-N --neighbors
|
-N --neighbors
|
||||||
points to use when sampling
|
points to use when sampling
|
||||||
range: (0,1024); default: 29
|
range: [0,1024]; default: 29
|
||||||
-r --radius
|
-r --radius
|
||||||
square neighborhood, always odd
|
square neighborhood, always odd
|
||||||
range: (0,32); default: [n/a]
|
range: [0,32]; default: [n/a]
|
||||||
-R --circle-radius
|
-R --circle-radius
|
||||||
circle neighborhood radius
|
circle neighborhood radius
|
||||||
range: (1,128); default: [n/a]
|
range: [1,128]; default: [n/a]
|
||||||
-M --tries
|
-M --tries
|
||||||
random points added to candidates
|
random points added to candidates
|
||||||
range: (0,65536); default: 192
|
range: [0,65536]; default: 192
|
||||||
-p --polish
|
-p --polish
|
||||||
extra iterations
|
extra iterations
|
||||||
range: (0,9); default: 0
|
range: [0,9]; default: 0
|
||||||
-m --magic
|
-m --magic
|
||||||
magic constant, affects iterations
|
magic constant, affects iterations
|
||||||
range: (0,255); default: 192
|
range: [0,255]; default: 192
|
||||||
-s --scale
|
-s --scale
|
||||||
output size multiplier; negative values set width and height
|
output size multiplier; negative values set width and height
|
||||||
range: (-8192,32); default: 1
|
range: [-8192,32]; default: 1
|
||||||
-S --seed
|
-S --seed
|
||||||
initial RNG value
|
initial RNG value
|
||||||
range: (0,); default: 0 [time(0)]
|
default: 0 [time(0)]
|
||||||
{files...}
|
{files...}
|
||||||
image files to open, resynthesize, and save as {filename}.resynth.png
|
image files to open, resynthesize, and save as {filename}.resynth.png
|
||||||
required default: [none]
|
required default: [none]
|
||||||
|
|
18
resynth.c
18
resynth.c
|
@ -390,51 +390,51 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
KYAA_FLAG_LONG('a', "autism",
|
KYAA_FLAG_LONG('a', "autism",
|
||||||
" sensitivity to outliers\n"
|
" sensitivity to outliers\n"
|
||||||
" range: (0,256); default: 32")
|
" range: [0,256]; default: 32")
|
||||||
parameters.autism = (double)(kyaa_flag_arg) / 256.;
|
parameters.autism = (double)(kyaa_flag_arg) / 256.;
|
||||||
|
|
||||||
KYAA_FLAG_LONG('N', "neighbors",
|
KYAA_FLAG_LONG('N', "neighbors",
|
||||||
" points to use when sampling\n"
|
" points to use when sampling\n"
|
||||||
" range: (0,1024); default: 29")
|
" range: [0,1024]; default: 29")
|
||||||
parameters.neighbors = kyaa_flag_arg;
|
parameters.neighbors = kyaa_flag_arg;
|
||||||
|
|
||||||
KYAA_FLAG_LONG('r', "radius",
|
KYAA_FLAG_LONG('r', "radius",
|
||||||
" square neighborhood, always odd\n"
|
" square neighborhood, always odd\n"
|
||||||
" range: (0,32); default: [n/a]")
|
" range: [0,32]; default: [n/a]")
|
||||||
int radius = kyaa_flag_arg;
|
int radius = kyaa_flag_arg;
|
||||||
radius = 2 * MAX(radius, 0) + 1;
|
radius = 2 * MAX(radius, 0) + 1;
|
||||||
parameters.neighbors = radius * radius;
|
parameters.neighbors = radius * radius;
|
||||||
|
|
||||||
KYAA_FLAG_LONG('R', "circle-radius",
|
KYAA_FLAG_LONG('R', "circle-radius",
|
||||||
" circle neighborhood radius\n"
|
" circle neighborhood radius\n"
|
||||||
" range: (1,128); default: [n/a]")
|
" range: [1,128]; default: [n/a]")
|
||||||
int radius = kyaa_flag_arg;
|
int radius = kyaa_flag_arg;
|
||||||
radius = CLAMP(radius, 1, (int)(LEN(disc00)));
|
radius = CLAMP(radius, 1, (int)(LEN(disc00)));
|
||||||
parameters.neighbors = disc00[radius - 1];
|
parameters.neighbors = disc00[radius - 1];
|
||||||
|
|
||||||
KYAA_FLAG_LONG('M', "tries",
|
KYAA_FLAG_LONG('M', "tries",
|
||||||
" random points added to candidates\n"
|
" random points added to candidates\n"
|
||||||
" range: (0,65536); default: 192")
|
" range: [0,65536]; default: 192")
|
||||||
parameters.tries = kyaa_flag_arg;
|
parameters.tries = kyaa_flag_arg;
|
||||||
|
|
||||||
KYAA_FLAG_LONG('p', "polish",
|
KYAA_FLAG_LONG('p', "polish",
|
||||||
" extra iterations\n"
|
" extra iterations\n"
|
||||||
" range: (0,9); default: 0")
|
" range: [0,9]; default: 0")
|
||||||
parameters.polish = kyaa_flag_arg;
|
parameters.polish = kyaa_flag_arg;
|
||||||
|
|
||||||
KYAA_FLAG_LONG('m', "magic",
|
KYAA_FLAG_LONG('m', "magic",
|
||||||
" magic constant, affects iterations\n"
|
" magic constant, affects iterations\n"
|
||||||
" range: (0,255); default: 192")
|
" range: [0,255]; default: 192")
|
||||||
parameters.magic = kyaa_flag_arg;
|
parameters.magic = kyaa_flag_arg;
|
||||||
|
|
||||||
KYAA_FLAG_LONG('s', "scale",
|
KYAA_FLAG_LONG('s', "scale",
|
||||||
" output size multiplier; negative values set width and height\n"
|
" output size multiplier; negative values set width and height\n"
|
||||||
" range: (-8192,32); default: 1")
|
" range: [-8192,32]; default: 1")
|
||||||
scale = kyaa_flag_arg;
|
scale = kyaa_flag_arg;
|
||||||
|
|
||||||
KYAA_FLAG_LONG('S', "seed",
|
KYAA_FLAG_LONG('S', "seed",
|
||||||
" initial RNG value\n"
|
" initial RNG value\n"
|
||||||
" range: (0,); default: 0 [time(0)]")
|
" default: 0 [time(0)]")
|
||||||
seed = (unsigned long) kyaa_flag_arg;
|
seed = (unsigned long) kyaa_flag_arg;
|
||||||
|
|
||||||
KYAA_HELP(" {files...}\n"
|
KYAA_HELP(" {files...}\n"
|
||||||
|
|
Loading…
Reference in a new issue