Zzzzz....

This commit is contained in:
tth
2021-05-17 22:38:56 +02:00
parent 77e967cf38
commit 41e77a5185
17 changed files with 90 additions and 19 deletions

View File

@@ -1,5 +1,8 @@
/*
FIMGFX
* some functions here come from 'funcs/contrast.c'
*
*/
#include <stdio.h>
#include <string.h>
@@ -22,7 +25,7 @@ typedef struct {
enum fxid { Fx_cos01=5, Fx_cos010, Fx_pow2, Fx_sqrt, Fx_gray0, Fx_halfsz0,
Fx_rot90, Fx_cmixa, Fx_desat, Fx_ctr2x2, Fx_norm,
Fx_classtrial, Fx_mirror, Fx_shift0,
Fx_classtrial, Fx_mirror, Fx_shift0, Fx_trimul,
Fx_xper, Fx_binarize, Fx_trinarize,Fx_hilight_R };
Fx fx_list[] = {
@@ -39,6 +42,7 @@ Fx fx_list[] = {
{ "ctr2x2", Fx_ctr2x2, 0, 1 },
{ "mirror", Fx_mirror, 0, 1 },
{ "shift0", Fx_shift0, 0, 1 },
{ "trimul", Fx_trimul, 0, 1 },
// { "norm", Fx_norm, 0, 1 },
{ "classtrial", Fx_classtrial, 0, 1 },
{ "binarize", Fx_binarize, 0, 1 },
@@ -51,6 +55,7 @@ Fx fx_list[] = {
static void list_of_effects(void)
{
Fx *fx;
/* this list must be on just ONE columns */
for (fx=fx_list; fx->name; fx++) {
printf("%s\n", fx->name);
}
@@ -89,7 +94,7 @@ fprintf(stderr, ">>> %s ( %p %p %f )\n", __func__, S, D, kf);
foo = fimg_classif_trial(S, D, kf, 0);
if (foo) {
fprintf(stderr, "%s err %d classif_trial %p\n", __func__,
fprintf(stderr, "%s error %d classif_trial %p\n", __func__,
foo, S);
return -98;
}
@@ -102,7 +107,7 @@ static void help(int lvl)
Fx *fx;
int foo;
printf("-- fimg special effects -- %s %s --\n", __DATE__, __TIME__);
printf("-*- fimg special effects -*- %s %s -*-\n", __DATE__, __TIME__);
puts("usage:");
puts("\tfimgfx [options] <effect> source.fimg resultat.fimg");
@@ -121,7 +126,7 @@ for (fx=fx_list; fx->name; fx++) {
foo = 0;
}
}
puts("");
puts("\n");
fimg_print_version(1);
exit(0);
}
@@ -203,9 +208,13 @@ switch (action) {
foo = fimg_mirror(&src, &dest, 0);
break;
case Fx_shift0:
fprintf(stderr, "Krkrk %d\n", action);
// fprintf(stderr, "Krkrk %d\n", action);
foo = fimg_auto_shift_to_zero(&src, &dest);
break;
case Fx_trimul:
fprintf(stderr, "trimul %d\n", action);
foo = fimg_sfx_triplemul(&src, &dest, 0);
break;
case Fx_ctr2x2:
foo = fimg_contour_2x2(&src, &dest, 0);
break;