How to capture an area of pixels ? - Pro3 - Fr/En

Hello ! I’m still new to processing and code in general. I might ask a lot so I take everything you could give to me !

I’m here to ask you what title already announces :

How to capture an area of pixel and to transpose it, somewhere else in my image ?

I want the area to parasites the image.
In fact, I need multiple areas and multiples interference.
Not only a capture multiplied into several interference that all look the same.

Also, I need them to be gone and that new ones appear.

And were to place it ? (in void draw ? somewhere else ?)

I already look at get() Ressources but don’t get it. It creates a rectangle but with one color…

:slight_smile:

Warm Regards !

get() will get you what you want - but you have to make sure you use the version that has four arguments, not two!

get(x,y) returns the color at a specific point.

get(x,y,w,h) gives you a PImage, a 2D array pf colors, AKA an image.

2 Likes

I thank you for this answer !

So, if I want to capture an area, I should use get(x,y,w,h), rigth ?

Do I place the function in void draw ? Or is it an independent one ?

Hello,

There are resources, tutorials, examples and references here:

You may also find something on the Coding Train.

:)

Ahah yes thx, I already seen ressources but nothing to answer my question to whre place get(), in my code ^^

But thank you !