some tests added...

This commit is contained in:
2020-01-10 12:01:12 +01:00
parent e51888b206
commit 0104a736ea
5 changed files with 85 additions and 17 deletions

View File

@@ -151,7 +151,7 @@ void fimg_mul_cste(FloatImg *fi, float value)
{
int nbre, idx;
if (fi->type != FIMG_TYPE_RGB) {
if ( (fi->type != FIMG_TYPE_RGB) && (fi->type != FIMG_TYPE_GRAY) ) {
fprintf(stderr, "%s : type %d invalide\n",
__func__, fi->type);
return;
@@ -183,6 +183,7 @@ if (fi->count < 1) {
/*
* mmmm, is this real ?
* how to accuratly check the value of 'I.fval' ?
*/
coef = 1.0 / ((double)fi->count * (double)fi->fval);