tth 1 year ago
parent
commit
ce73143d96
  1. 2
      funcs/Makefile
  2. 6
      funcs/t.c
  3. 12
      funcs/tests.c
  4. 2
      funcs/tests.h

2
funcs/Makefile

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
# Please, use the 'Gloabl.makefile' system !
COPT = -Wall -fpic -g -no-pie -DDEBUG_LEVEL=1
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 \

6
funcs/t.c

@ -22,7 +22,7 @@ float global_fvalue; @@ -22,7 +22,7 @@ float global_fvalue;
enum nCmd { Equalize=1, Rotate, Sfx0, F3x3, MIRE, Wfits, Wpng, Wtiff,
Histo, Hsv, Classif, Ctr2x2, Qsortrgb,
Displace, ReadPNG, Plasmas, Hilight, OpenEXR,
Geometrie };
Geometrie, FileType };
typedef struct {
char *name;
int Cmd;
@ -48,6 +48,7 @@ Command commands[] = { @@ -48,6 +48,7 @@ Command commands[] = {
{ "hilight", Hilight },
{ "openexr", OpenEXR },
{ "geometrie", Geometrie, },
{ "filetype", FileType },
{ NULL, 0 }
} ;
@ -207,6 +208,9 @@ switch(opt) { @@ -207,6 +208,9 @@ switch(opt) {
case Geometrie:
foo = essai_geometrie(filename, 0);
break;
case FileType:
foo = essai_detect_type();
break;
default:
fprintf(stderr, "'%s' is a bad command\n", command);
exit(1);

12
funcs/tests.c

@ -616,22 +616,22 @@ int foo; @@ -616,22 +616,22 @@ int foo;
char *fname;
foo = format_from_extension(fname="foo.fimg");
printf("%-10s %d\n\n", fname, foo);
printf("%-10s %3d\n", fname, foo);
foo = format_from_extension(fname="foo.pnm");
printf("%-10s %d\n\n", fname, foo);
printf("%-10s %3d\n", fname, foo);
foo = format_from_extension(fname="foo.png");
printf("%-10s %d\n\n", fname, foo);
printf("%-10s %3d\n", fname, foo);
foo = format_from_extension(fname="foo.tiff");
printf("%-10s %d\n\n", fname, foo);
printf("%-10s %3d\n", fname, foo);
foo = format_from_extension(fname="foo.fits");
printf("%-10s %d\n\n", fname, foo);
printf("%-10s %3d\n", fname, foo);
foo = format_from_extension(fname="foo.xyzzy");
printf("%-10s %d\n\n", fname, foo);
printf("%-10s %3d\n", fname, foo);
return 0;
}

2
funcs/tests.h

@ -20,7 +20,7 @@ int fimg_essai_hsv(char *infile); @@ -20,7 +20,7 @@ int fimg_essai_hsv(char *infile);
int essai_classif(char *infile, char *outfile, float fvalue);
int essai_contour_2x2(char *filename, char *outfile);
int essai_geometrie(char *infile, int notused);
int essai_detect_type(void);
int fimg_essai_histo(FloatImg *src, char *outpic, int k); /* histogram.c */
int essai_histogramme(char *fname, int k);

Loading…
Cancel
Save