From 65eaca26cc4e0c22c08d89ac69fe408c19a1dbb4 Mon Sep 17 00:00:00 2001 From: tth Date: Tue, 4 May 2021 09:56:18 +0200 Subject: [PATCH] nothing to see here --- floatimg.h | 4 +++- funcs/Makefile | 8 ++++++-- funcs/recurse.c | 26 ++++++++++++++++++++++++++ funcs/tests.c | 37 ++++++++++++++++++++++++++++++++++++- 4 files changed, 71 insertions(+), 4 deletions(-) create mode 100644 funcs/recurse.c diff --git a/floatimg.h b/floatimg.h index 7620f27..b9d4369 100644 --- a/floatimg.h +++ b/floatimg.h @@ -4,11 +4,12 @@ * http://la.buvette.org/photos/cumul */ -#define FIMG_VERSION 142 +#define FIMG_VERSION 143 /* * in memory descriptor */ +#define MAGIC_FIMG 0x00F11F00 typedef struct { unsigned long magic; int width; @@ -28,6 +29,7 @@ typedef struct { int w, h, t; } FimgFileHead; +#define MAGIC_AREA51 0xA5EA0051 typedef struct { unsigned long magic; int w, h; diff --git a/funcs/Makefile b/funcs/Makefile index de11a42..1b27ebb 100644 --- a/funcs/Makefile +++ b/funcs/Makefile @@ -3,7 +3,7 @@ # Please, use the 'Gloabl.makefile' system ! -COPT = -Wall -fpic -g -no-pie -DDEBUG_LEVEL=0 +COPT = -Wall -fpic -g -no-pie -DDEBUG_LEVEL=0 DEPS = ../floatimg.h Makefile OBJS = fimg-png.o fimg-tiff.o misc-plots.o filtrage.o utils.o \ @@ -11,7 +11,8 @@ OBJS = fimg-png.o fimg-tiff.o misc-plots.o filtrage.o utils.o \ geometry.o rotate.o fimg-openexr.o \ equalize.o fimg-fits.o saturation.o histogram.o \ hsv.o classif.o contour2x2.o qsortrgb.o exporter.o \ - displacement.o dithering.o plasmas.o incrustator.o + displacement.o dithering.o plasmas.o incrustator.o \ + recurse.o #--------------------------------------------------------------- @@ -35,6 +36,9 @@ tests.o: tests.c tests.h $(DEPS) # ### +recurse.o: recurse.c $(DEPS) + gcc $(COPT) -c $< + incrustator.o: incrustator.c $(DEPS) gcc $(COPT) -c $< diff --git a/funcs/recurse.c b/funcs/recurse.c new file mode 100644 index 0000000..6b17cf1 --- /dev/null +++ b/funcs/recurse.c @@ -0,0 +1,26 @@ +/* + RECURSION 'QUADTREE' SUR LES IMAGES + ----------------------------------- +*/ + +#include +#include + +#include "../floatimg.h" + +/* -------------------------------------------------------------------- */ +/* may be we need some private variables ? */ +/* -------------------------------------------------------------------- */ +/* nouveau 29 avril 2021, pendant un autre masque-flamme coronavidique */ + +int fimg_recursion_proto(FloatImg *src, FloatImg *dst, int notused) +{ + +#if DEBUG_LEVEL +fprintf(stderr, ">>> %s ( %p %p %d )\n", __func__, src, dst, notused); +#endif + +return -1; +} +/* -------------------------------------------------------------------- */ +/* -------------------------------------------------------------------- */ diff --git a/funcs/tests.c b/funcs/tests.c index 6b9f5be..4ff6d05 100644 --- a/funcs/tests.c +++ b/funcs/tests.c @@ -16,6 +16,41 @@ extern int verbosity; +/* --------------------------------------------------------------------- */ + +int fimg_recursion_proto(FloatImg *src, FloatImg *dst, int notused); + +int essai_recursion(char *inf, char *outf, int flags) +{ +int foo; +FloatImg src, dst; + +fprintf(stderr, ">>> %s ( '%s' '%s' 0x%04X )\n", __func__, + inf, outf, flags); + +foo = fimg_create_from_dump(inf, &src); +if (0 != foo) { + fprintf(stderr, "%s: err %d loading image '%s'\n", __func__, + foo, inf); + return foo; + } + +fimg_clone(&src, &dst, 0); + +foo = fimg_recursion_proto(&src, &dst, flags); +if (foo) { + fprintf(stderr, "%s: fail %d\n", __func__, foo); + return foo; + } + +foo = fimg_export_picture(&dst, outf, 0); +if (foo) { + fprintf(stderr, "%s : err %d saving result\n", __func__, foo); + return foo; + } + +return -1; +} /* --------------------------------------------------------------------- */ int essai_miroir(char *inf, char *outf, int flags) { @@ -47,7 +82,7 @@ if (foo) { return foo; } -return -1; +return 0; } /* --------------------------------------------------------------------- */ /* nouveau 21 mars 2021 - rue d'Aragon */