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

**URL:** <https://discourse.processing.org/t/how-to-capture-an-area-of-pixels-pro3-fr-en/25747>\
**Category:** Coding Questions\
**Created:** [November 27, 2020, 1:50am UTC](https://discourse.processing.org/t/how-to-capture-an-area-of-pixels-pro3-fr-en/25747 "2020-11-27T01:50:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eli0kYd](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/eli0kyd/32/11221_2.png) [@Eli0kYd](https://discourse.processing.org/u/Eli0kYd)\
**Post date:** [November 27, 2020, 1:50am UTC](https://discourse.processing.org/t/how-to-capture-an-area-of-pixels-pro3-fr-en/25747/1 "2020-11-27T01:50:37Z")

</div>

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…

🙂

Warm Regards !

---

<div class="post-metadata">

**Author:** ![TfGuy44](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tfguy44/32/41_2.png) [@TfGuy44](https://discourse.processing.org/u/TfGuy44)\
**Post date:** [November 27, 2020, 4:32am UTC](https://discourse.processing.org/t/how-to-capture-an-area-of-pixels-pro3-fr-en/25747/2 "2020-11-27T04:32:48Z")

</div>

`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.

---

<div class="post-metadata">

**Author:** ![Eli0kYd](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/eli0kyd/32/11221_2.png) [@Eli0kYd](https://discourse.processing.org/u/Eli0kYd)\
**Post date:** [November 27, 2020, 1:21pm UTC](https://discourse.processing.org/t/how-to-capture-an-area-of-pixels-pro3-fr-en/25747/3 "2020-11-27T13:21:04Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [November 27, 2020, 2:51pm UTC](https://discourse.processing.org/t/how-to-capture-an-area-of-pixels-pro3-fr-en/25747/4 "2020-11-27T14:51:03Z")

</div>

Hello,

There are resources, tutorials, examples and references here:

> **[Welcome to Processing!](https://processing.org)**
>
> Processing is a flexible software sketchbook and a language for learning how to code. Since 2001, Processing has promoted software literacy within the visual arts and visual literacy within technology…

You may also find something on the [Coding Train](https://www.youtube.com/channel/UCvjgXvBlbQiydffZU7m1_aw).

`:)`

---

<div class="post-metadata">

**Author:** ![Eli0kYd](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/eli0kyd/32/11221_2.png) [@Eli0kYd](https://discourse.processing.org/u/Eli0kYd)\
**Post date:** [November 27, 2020, 3:33pm UTC](https://discourse.processing.org/t/how-to-capture-an-area-of-pixels-pro3-fr-en/25747/5 "2020-11-27T15:33:16Z")

</div>

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

But thank you !
