Infinite loop when using image()

Hello @rustyrobison,

This can be confirmed by changing the loop count; I tried a few lower values and it did not give an error message.

The code provided is fading in a for() loop and this will be rapid and not be seen over time.

Consider fading over time in the draw() loop which is 60 fps:

if (fading)
	{
	f++;  
    if (f>255)
		{
		f = 0;
		fading = false;	
		}
	textSize(48);	
	text(f, width/2, height/2)	
	}

Above code is not complete but worked when used to fade an image over time with tint().

:)

1 Like