From c3c5e0dc3fb3bef92f5937c95d0d8b07db072476 Mon Sep 17 00:00:00 2001 From: le vieux Date: Tue, 10 Nov 2020 00:50:25 +0100 Subject: [PATCH] not a milestone --- Fonderie/Makefile | 12 +++++++++--- Fonderie/README.md | 6 ++++++ Fonderie/crapulator.c | 11 ++++------- Fonderie/fonctions.h | 1 + Fonderie/interpolator.c | 15 ++++++++++++++- Fonderie/sfx.c | 12 +++++++++--- 6 files changed, 43 insertions(+), 14 deletions(-) diff --git a/Fonderie/Makefile b/Fonderie/Makefile index 4a15b846..a6079de8 100644 --- a/Fonderie/Makefile +++ b/Fonderie/Makefile @@ -7,6 +7,11 @@ LIBS = -lfloatimg -lpnglite -lm OBJS = fonctions.o sfx.o crapulator.o DEPS = fonctions.h crapulator.h +all: fonderie interpolator + +# --------------------------------------------------------- + + fonderie: fonderie.c ${DEPS} ${OBJS} Makefile gcc ${COPT} $< ${OBJS} ${LIBS} -lz -o $@ @@ -21,9 +26,10 @@ sfx.o: sfx.c ${DEPS} Makefile # --------------------------------------------------------- # -# another way... +# another way to brotch some pics... +# -interpolator: interpolator.c Makefile - gcc ${COPT} $< ${LIBS} -lz -o $@ +interpolator: interpolator.c ${OBJS} Makefile + gcc ${COPT} $< ${OBJS} ${LIBS} -lz -o $@ # --------------------------------------------------------- diff --git a/Fonderie/README.md b/Fonderie/README.md index fccc702b..fbc27726 100644 --- a/Fonderie/README.md +++ b/Fonderie/README.md @@ -67,6 +67,12 @@ criant de documentation... ## Interpolator +Un logiciel dont l'inspiration vient de Terre-Blanque, ça ne peut +pas être complètement malsain :) + + +## Conclusion + **Use the source, Luke** diff --git a/Fonderie/crapulator.c b/Fonderie/crapulator.c index c974dd13..48f28df0 100644 --- a/Fonderie/crapulator.c +++ b/Fonderie/crapulator.c @@ -11,7 +11,6 @@ #include "crapulator.h" /* -------------------------------------------------------------- */ -/* support function for the crapulator */ static int effect_3(FloatImg *image) { float value; @@ -76,7 +75,6 @@ if (666==count) { switch (idFx) { case 0: /* DO NOTHING */ retval = 0; break; - case 1: fimg_cos_01(image, image, fimg_get_maxvalue(image)); @@ -99,15 +97,12 @@ switch (idFx) { case 6: fimg_killcolors_a(image, 0.0); break; - case 7: retval = fimg_colors_mixer_a(image, 2.0); break; - case 8: retval = insitu_ctr2x2(image); break; - case 9: retval = fimg_classif_trial(image, image, 0.37, 0); if (retval) { @@ -115,11 +110,13 @@ switch (idFx) { exit(1); } break; - case 10: retval = binarize(image, 0); break; - + case 11: + retval = trinarize(image, 0); + break; + /* --- WTF -- */ default : fprintf(stderr, "%s : effect #%d invalid\n", __func__, idFx); diff --git a/Fonderie/fonctions.h b/Fonderie/fonctions.h index ff1fa934..e0e93a39 100644 --- a/Fonderie/fonctions.h +++ b/Fonderie/fonctions.h @@ -40,6 +40,7 @@ int create_fifo(int nbslot, int w, int h, int t); * funcs in 'sfx.c' */ +int trinarize(FloatImg *pimg, int notused); int binarize(FloatImg *pimg, int notused); int brotche_rand48_a(FloatImg *fimg, float ratio, float mval); diff --git a/Fonderie/interpolator.c b/Fonderie/interpolator.c index d5b937dc..918d495e 100644 --- a/Fonderie/interpolator.c +++ b/Fonderie/interpolator.c @@ -14,9 +14,12 @@ #include "../floatimg.h" +#include "crapulator.h" + // XXX #include "fonctions.h" int verbosity; +int convert_to_gray; /* needed by fonctions.c */ /* -------------------------------------------------------------- */ int interpolator(char *pattern, char *outdir, int Nsteps) @@ -63,10 +66,20 @@ for (idx=0; idx