This commit is contained in:
tonton th 2020-12-26 10:39:50 +01:00
parent db05907447
commit ce96b51ca4
1 changed files with 1 additions and 4 deletions

View File

@ -100,7 +100,7 @@ int random_blocks(FloatImg *picture, int percent)
{
int x, y;
if ( (picture->width%16) || (picture->height%8) )
if ( (picture->width%16) || (picture->height%16) )
{
fprintf(stderr, "%s: %d%d bad dims\n", __func__,
picture->width, picture->height);
@ -173,9 +173,7 @@ h = picz->height; w = picz->width;
for (y=BB; y<h-BB; y++) {
dy = (float)y * omega; /* normalize vertical position */
x = xpos + x_delta(dy, phi); /* add sinus deviation */
/* compute bounding box */
if ( (x>BB) && (x<w-BB) ) {
/* an make the glitch */
@ -184,7 +182,6 @@ for (y=BB; y<h-BB; y++) {
if (rand() & 8)
fimg_plot_rgb(picz, x-1, y, fv, fv, fv);
if (rand() & 8)
// XXX else
fimg_plot_rgb(picz, x+1, y, fv, fv, fv);
}
}