This commit is contained in:
tTh 2023-06-26 17:34:53 +02:00
parent 67cb70fa3b
commit 253647c008
2 changed files with 8 additions and 6 deletions

View File

@ -161,20 +161,22 @@ for (pass=0; pass<szimg/32; pass++) {
return 0; return 0;
} }
/* -------------------------------------------------------------- */ /* -------------------------------------------------------------- */
/*
* FIXME XXX
*/
int random_blocks(FloatImg *picture, int percent) int random_blocks(FloatImg *picture, int percent)
{ {
int x, y; int x, y;
if ( (picture->width%16) || (picture->height%16) ) if ( (picture->width%16) || (picture->height%16) )
{ {
fprintf(stderr, "%s: %d%d bad dims\n", __func__, fprintf(stderr, "WARNING %s: %dx%d bad dims\n", __func__,
picture->width, picture->height); picture->width, picture->height);
return -1; // return -1;
} }
for (y=0; y<picture->height; y+=16) { for (y=16; y<picture->height-16; y+=16) {
for (x=0; x<picture->width; x+=16) { for (x=16; x<picture->width-16; x+=16) {
if (percent < (rand()%100) ) { if (percent < (rand()%100) ) {
un_petit_flou_8x8(picture, x, y); un_petit_flou_8x8(picture, x, y);
un_petit_flou_8x8(picture, x+8, y); un_petit_flou_8x8(picture, x+8, y);

View File

@ -39,7 +39,7 @@ fprintf(stderr, ">>> %s ( '%s' '%s' %d %d )\n", __func__,
globber, destdir, fchain, outfmt); globber, destdir, fchain, outfmt);
#endif #endif
// filterstack_list(fchain, "Run the single pass"); if (verbosity) filterstack_list(fchain, "Run the single pass");
(void)fimg_timer_set(0); (void)fimg_timer_set(0);