Browse Source

printf min & max values

master
tth 2 years ago
parent
commit
f04f37ce43
  1. 4
      floatimg.h
  2. 10
      funcs/utils.c

4
floatimg.h

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
* ugly code from tTh
*/
#define FIMG_VERSION 109
#define FIMG_VERSION 110
/*
* in memory descriptor
@ -182,6 +182,8 @@ int fimg_save_as_png(FloatImg *src, char *outname, int flags); @@ -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_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_double(char *str, double *dptr);
int format_from_extension(char *fname);

10
funcs/utils.c

@ -7,6 +7,16 @@ @@ -7,6 +7,16 @@
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)
{

Loading…
Cancel
Save