+ random blocks 8x8

This commit is contained in:
2020-12-20 11:12:43 +01:00
parent 6bd95089f9
commit cdeeb9d92d
3 changed files with 25 additions and 0 deletions

View File

@@ -96,6 +96,25 @@ for (y=0; y<8; y++) {
return 0;
}
/* -------------------------------------------------------------- */
int random_blocks(FloatImg *picture, int percent)
{
int x, y;
for (y=0; y<picture->height; y+=8) {
for (x=0; x<picture->width; x+=8) {
if (percent < (rand()%100) ) {
un_petit_flou_8x8(picture,x, y);
}
}
}
return 0;
}
/* -------------------------------------------------------------- */
int un_moyen_flou_8x8(FloatImg *picture, int xpos, int ypos)
{
int i, j, x, y;