morpho0 filter in fimgfx

This commit is contained in:
tTh 2022-11-01 21:18:09 +01:00
parent 86a903360c
commit d49b77a79f
3 changed files with 14 additions and 3 deletions

View File

@ -20,7 +20,7 @@
* https://git.tetalab.org/tTh/FloatImg
*/
#define FIMG_VERSION (205)
#define FIMG_VERSION (206)
#define RELEASE_NAME ("noname")
/* XXX add a test for stdint.h / uint32_t XXX */

View File

@ -28,7 +28,8 @@ 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_trimul,
Fx_xper, Fx_binarize, Fx_trinarize, Fx_hilight_R,
Fx_absolute, Fx_clamp, Fx_fakol0 };
Fx_absolute, Fx_clamp, Fx_fakol0, Fx_fakol3,
Fx_morph0, Fx_morph4, Fx_morph8 };
Fx fx_list[] = {
{ "cos01", Fx_cos01, 0, 1 },
@ -53,6 +54,9 @@ Fx fx_list[] = {
{ "abs", Fx_absolute, 0, 1 },
{ "clamp", Fx_clamp, 0, 1 },
{ "fakol0", Fx_fakol0, 0, 1 },
{ "morph0", Fx_morph0, 0, 1 },
{ "morph4", Fx_morph4, 0, 1 },
{ "morph8", Fx_morph8, 0, 1 },
{ NULL, 0, 0, 0 }
};
@ -261,6 +265,13 @@ switch (action) {
foo = fimg_falsecolors_0(&src, &dest, 0, 1.0);
break;
case Fx_morph0:
foo = fimg_filtre_morpho_0(&src, &dest, 0); break;
case Fx_morph4:
foo = fimg_filtre_morpho_0(&src, &dest, 4); break;
case Fx_morph8:
foo = fimg_filtre_morpho_0(&src, &dest, 8); break;
default:
fprintf(stderr, "%s %s : %d is bad action\n",
__FILE__, __func__, action);

View File

@ -1,6 +1,6 @@
#!/bin/bash
SRC="in.fimg"
SRC="../lib/quux.fimg"
K="0.414"
TMP="/tmp/foo.fimg"