work on experiment code

This commit is contained in:
tth 2021-05-10 00:44:29 +02:00
parent 73b8048dea
commit 0ea39f2f9a
6 changed files with 14 additions and 25 deletions

View File

@ -9,7 +9,7 @@ LIBS = -ltiff -lpnglite -lcfitsio
all: assemblage extracteur
assemblage: assemblage.c Makefile
gcc $(COPT) $< incrustator.o ../libfloatimg.a $(LIBS) -o $@
gcc $(COPT) $< ../libfloatimg.a $(LIBS) -o $@
extracteur: extracteur.c Makefile
gcc $(COPT) $< ../libfloatimg.a $(LIBS) -o $@

View File

@ -7,7 +7,7 @@
#include "../floatimg.h"
#include "incrustator.h"
// #include "incrustator.h"
int verbosity;
@ -43,7 +43,7 @@ if (foo) {
}
#define FLAGS 0
foo = incrustator_0(&incrust, &grande, 111, 111, FLAGS);
foo = fimg_incrustator_0(&incrust, &grande, 111, 111, FLAGS);
#undef FLAGS
if (foo) {
fprintf(stderr, "%s: err %d sur incrustator_0\n", __func__, foo);
@ -71,7 +71,7 @@ verbosity = 2;
fimg_print_version(1);
foo = premier_essai(1280, 1024, "out.pnm");
foo = premier_essai(1280, 1024, "out.png");
if (foo) {
fprintf(stderr, "EPIC FAIL %s\n", argv[0]);
exit(1);

View File

@ -7,22 +7,12 @@
#include "../floatimg.h"
#include "incrustator.h"
// #include "incrustator.h"
int verbosity;
/* ---------------------------------------------- ~~~~~~~~~~~~~~~~ */
/* ---------------------------------------------- ~~~~~~~~~~~~~~~~ */
int print_rectangle(FimgArea51 *rect)
{
printf("rect @ %p : %dx%d at %d,%d\n", rect, rect->w, rect->h,
rect->x, rect->y);
return 0;
}
/* ---------------------------------------------- ~~~~~~~~~~~~~~~~ */
/* ---------------------------------------------- ~~~~~~~~~~~~~~~~ */
int essai_extraction(FloatImg *in, FloatImg *out, FimgArea51 *rect)
{

View File

@ -1,9 +0,0 @@
/*
* incrustator experimental
*/
/*
* MOVED TO 'funcs/inscrutator.c'
*/
int incrustator_0(FloatImg *psrc, FloatImg *pdst,
int xpos, int ypos, int flags);

View File

@ -4,7 +4,7 @@
* http://la.buvette.org/photos/cumul
*/
#define FIMG_VERSION 144
#define FIMG_VERSION 145
/*
* in memory descriptor
@ -224,6 +224,7 @@ int fimg_multirandom(FloatImg *fimg, long nbpass);
void fimg_print_minmax(float minmax[6], char *titre);
int parse_WxH(char *str, int *pw, int *ph);
int parse_double(char *str, double *dptr);
int print_rectangle(char *str, FimgArea51 *rect);
int parse_rectangle(char *str, FimgArea51 *r, int notused);
int format_from_extension(char *fname);
char * extension_from_format(int fmt);

View File

@ -72,6 +72,13 @@ return -1;
}
/* --------------------------------------------------------------------- */
int print_rectangle(char *str, FimgArea51 *rect)
{
printf("rect @ %p '%s':\n\t %dx%d at %d,%d\n", rect, str,
rect->w, rect->h, rect->x, rect->y);
return 0;
}
/* ---------------------------------------------- ~~~~~~~~~~~~~~~~ */
/*
* /!\ return 4 on success
*/