forked from tTh/FloatImg
FloatImg sources upgraded to version 147
This commit is contained in:
@@ -59,7 +59,7 @@ for (y=0; y<psrc->height; y++) {
|
||||
fimg_get_rgb(psrc, x, y, rgb);
|
||||
|
||||
dispx = (float)x + (rgb[1]/dltg * 20.0);
|
||||
dispy = (float)y + (rgb[2]/dltb * 10.0);
|
||||
dispy = (float)y + (rgb[2]/dltb * 20.0);
|
||||
dstx = (int)roundf(dispx - 10.0);
|
||||
dsty = (int)roundf(dispy - 10.0);
|
||||
|
||||
|
||||
@@ -86,6 +86,24 @@ for (y=1; y<fimg->height; y++) {
|
||||
return 0;
|
||||
}
|
||||
/* --------------------------------------------------------------------- */
|
||||
int fimg_mircol_1(FloatImg *dst, float mval)
|
||||
{
|
||||
int x, y;
|
||||
float fx, fy, rgb[3];
|
||||
|
||||
for (y=0; y<dst->height; y++) {
|
||||
fy = (float)y / (float)dst->height;
|
||||
for (x=0; x<dst->width; x++) {
|
||||
fx = (float)x / (float)dst->width;
|
||||
rgb[0] = mval * fx;
|
||||
rgb[1] = mval * ((fx+fy)/2.0);
|
||||
rgb[2] = mval * fy;
|
||||
fimg_put_rgb(dst, x, y, rgb);
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
/* --------------------------------------------------------------------- */
|
||||
int fimg_multirandom(FloatImg *fimg, long nbpass)
|
||||
{
|
||||
int foo, x, y;
|
||||
|
||||
Reference in New Issue
Block a user