Browse Source

work on experiment code

master
tth 6 months ago
parent
commit
0ea39f2f9a
6 changed files with 14 additions and 25 deletions
  1. +1
    -1
      experiment/Makefile
  2. +3
    -3
      experiment/assemblage.c
  3. +1
    -11
      experiment/extracteur.c
  4. +0
    -9
      experiment/incrustator.h
  5. +2
    -1
      floatimg.h
  6. +7
    -0
      funcs/utils.c

+ 1
- 1
experiment/Makefile 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 $@

+ 3
- 3
experiment/assemblage.c 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);


+ 1
- 11
experiment/extracteur.c 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)
{


+ 0
- 9
experiment/incrustator.h 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);

+ 2
- 1
floatimg.h 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);


+ 7
- 0
funcs/utils.c 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
*/


Loading…
Cancel
Save