doc about fimg2text + small patches

This commit is contained in:
tth
2021-04-24 15:18:06 +02:00
parent 5ac050fa10
commit 004f24689b
2 changed files with 69 additions and 4 deletions

View File

@@ -90,6 +90,11 @@ fprintf(stderr, ">>> %25s ( '%s' '%s' %d )\n", __func__,
srcname, dstname, notused);
#endif
if (steps < 1) {
fprintf(stderr, "%s: steps MUST be > 0\n", __func__);
exit(1);
}
foo = fimg_fileinfos(srcname, infos);
if (foo) {
fprintf(stderr, "'%s' get dims -> %d\n", srcname, foo);
@@ -142,11 +147,13 @@ exit(0);
int main(int argc, char *argv[])
{
int foo, opt;
int steps = 16;
int steps = 1;
float norm_val = 222.0; /* < 0 : don't normalize */
char separator = ' ';
while ((opt = getopt(argc, argv, "hn:s:v")) != -1) {
while ((opt = getopt(argc, argv, "f:hn:s:v")) != -1) {
switch(opt) {
case 'f': separator = optarg[0]; break;
case 'v': verbosity++; break;
case 'h': help(1); exit(1);
case 's': steps = atoi(optarg); break;