diff --git a/funcs/decomprgb.c b/funcs/decomprgb.c
index 58ef5343..55f938e8 100644
--- a/funcs/decomprgb.c
+++ b/funcs/decomprgb.c
@@ -60,6 +60,7 @@ for (y=0; y
R[pixidx(pdst,x,y)] = cumul;
+ pdst->R[pixidx(pdst,x+w2,y+h2)] = cumul;
cumul = getGpix(psrc, x2, y2) +
getGpix(psrc, x2, y2+1) +
@@ -67,6 +68,7 @@ for (y=0; yG[pixidx(pdst,x+w2,y)] = cumul;
+ pdst->G[pixidx(pdst,x+w2,y+h2)] = cumul;
cumul = getBpix(psrc, x2, y2) +
getBpix(psrc, x2, y2+1) +
@@ -74,10 +76,8 @@ for (y=0; yB[pixidx(pdst,x,y+h2)] = cumul;
+ pdst->B[pixidx(pdst,x+w2,y+h2)] = cumul;
- idx = pixidx(pdst,x+w2,y+h2);
- pdst->R[idx] = pdst->G[idx] = \
- pdst->B[idx] = vgray / 3.0;
}
}
diff --git a/funcs/t.c b/funcs/t.c
index ad767f0c..3734eb7e 100644
--- a/funcs/t.c
+++ b/funcs/t.c
@@ -232,7 +232,7 @@ switch(opt) {
foo = essai_split_level(filename, outfile, 0);
break;
case DecompRgbz:
- foo = essai_decomprgb(filename, outfile);
+ foo = essai_decomprgb_color(filename, outfile);
break;
case Rectangle:
essai_rectangle(outfile, 0);
diff --git a/funcs/tests.c b/funcs/tests.c
index 6ff3e503..ec0ee738 100644
--- a/funcs/tests.c
+++ b/funcs/tests.c
@@ -75,7 +75,7 @@ return 0;
}
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
-int essai_decomprgb(char *inf, char *outf)
+int essai_decomprgb_color(char *inf, char *outf)
{
int foo;
FloatImg src, dst;
@@ -90,7 +90,7 @@ if (0 != foo) {
}
fimg_clone(&src, &dst, 1);
-foo = fimg_decomp_rgbz_gray(&src, &dst, 0);
+foo = fimg_decomp_rgbz_color(&src, &dst, 0);
if (foo) {
fprintf(stderr, "%s:%s(): fail %d line %d\n",
__FILE__, __func__, foo, __LINE__);
diff --git a/funcs/tests.h b/funcs/tests.h
index ef196d07..a4c5a090 100644
--- a/funcs/tests.h
+++ b/funcs/tests.h
@@ -6,7 +6,7 @@
int essai_plasma(char *infile, char *outfile, int ikoef, float fkoef);
int essai_miroir(char *inf, char *outf, int flags);
int essai_killrgb(char *inf, char *outf);
-int essai_decomprgb(char *inf, char *outf);
+int essai_decomprgb_color(char *inf, char *outf);
int essai_split_level(char *inf, char *outf, int flags);
int essai_displacement(char *infile, char *outfile);
@@ -35,3 +35,4 @@ int essai_openexr(char *inf, char *outf, int flags);
int essai_pixelize(char *infile, char *outfile);
+int essai_rectangle(char *outf, int k);