printf min & max values

This commit is contained in:
tth 2020-10-26 16:19:51 +01:00
parent 8b8cf74128
commit f04f37ce43
2 changed files with 13 additions and 1 deletions

View File

@ -3,7 +3,7 @@
* ugly code from tTh * ugly code from tTh
*/ */
#define FIMG_VERSION 109 #define FIMG_VERSION 110
/* /*
* in memory descriptor * in memory descriptor
@ -182,6 +182,8 @@ int fimg_save_as_png(FloatImg *src, char *outname, int flags);
int fimg_test_pattern(FloatImg *fimg, int type, double dval); int fimg_test_pattern(FloatImg *fimg, int type, double dval);
int fimg_draw_something(FloatImg *fimg); int fimg_draw_something(FloatImg *fimg);
/* file is 'funcs/utils.c' */
void fimg_print_minmax(float minmax[6], char *titre);
int parse_WxH(char *str, int *pw, int *ph); int parse_WxH(char *str, int *pw, int *ph);
int parse_double(char *str, double *dptr); int parse_double(char *str, double *dptr);
int format_from_extension(char *fname); int format_from_extension(char *fname);

View File

@ -7,6 +7,16 @@
extern int verbosity; /* must be declared around main() */ extern int verbosity; /* must be declared around main() */
/* --------------------------------------------------------------------- */
void fimg_print_minmax(float minmax[6], char *titre)
{
fprintf(stderr, "\t\tminmax %s\n", titre);
fprintf(stderr, "red\t\t%10f %10f\n", minmax[0], minmax[1]);
fprintf(stderr, "green\t\t%10f %10f\n", minmax[2], minmax[3]);
fprintf(stderr, "blue\t\t%10f %10f\n", minmax[4], minmax[5]);
}
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
int parse_WxH(char *str, int *pw, int *ph) int parse_WxH(char *str, int *pw, int *ph)
{ {