commit du soir, espoir
This commit is contained in:
39
funcs/equalize.c
Normal file
39
funcs/equalize.c
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* FLOATIMG
|
||||
* egalisation dinamique approximative
|
||||
* #coronamaison Thu 09 Apr 2020 03:37:10 PM CEST
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../floatimg.h"
|
||||
|
||||
extern int verbosity;
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
int fimg_equalize_compute(FloatImg *src, void *vptr)
|
||||
{
|
||||
float minmax[6];
|
||||
int foo;
|
||||
|
||||
#if DEBUG_LEVEL
|
||||
fprintf(stderr, ">>> %s ( %p )\n", __func__, src);
|
||||
#endif
|
||||
|
||||
foo = fimg_get_minmax_rgb(src, minmax);
|
||||
printf("Rmin %12.4g Rmax %12.4g\n", minmax[0], minmax[1]);
|
||||
printf("Gmin %12.4g Gmax %12.4g\n", minmax[2], minmax[3]);
|
||||
printf("Bmin %12.4g Bmax %12.4g\n", minmax[4], minmax[5]);
|
||||
|
||||
if ( (minmax[0]<0.0) || (minmax[2]<0.0) || (minmax[4]<0.0) ) {
|
||||
fprintf(stderr, "%s: negative value ?\n", __func__);
|
||||
return -4;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
/* --------------------------------------------------------------------- */
|
||||
/* --------------------------------------------------------------------- */
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user