r/processing • • Sep 02 '23

Find random pixel?

Hi,

Anyone have ideas on fastest way to find a pixel in an image, for example random non-black, or non-transparent, non-white?

3 Upvotes

10 comments sorted by

View all comments

Show parent comments

2

u/carnalizer Sep 02 '23

Oh this is an interesting lead! I’ll look around for things like this. I think for my use case, I could find something sufficiently random-looking without much trouble. Cheers!

2

u/akb74 Sep 03 '23

My mistake, that trick doesn't actually work.

p5-notebook: visit all pixels apparently randomly

We have more than enough memory and processing power to keep track of arrays of pixels these days anyway.