forked from tTh/FloatImg
fixed a little brotch
This commit is contained in:
parent
8dbe6dd5c1
commit
f09162d4ce
|
@ -60,6 +60,7 @@ for (y=0; y<h2; y++)
|
|||
getRpix(psrc, x2+1, y2+1);
|
||||
cumul /= 4, vgray = cumul;
|
||||
pdst->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; y<h2; y++)
|
|||
getGpix(psrc, x2+1, y2+1);
|
||||
cumul /= 4, vgray += cumul;
|
||||
pdst->G[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; y<h2; y++)
|
|||
getBpix(psrc, x2+1, y2+1);
|
||||
cumul /= 4, vgray += cumul;
|
||||
pdst->B[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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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__);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue