# What does get() return?

**URL:** <https://discourse.processing.org/t/what-does-get-return/3069>\
**Category:** Coding Questions\
**Created:** [August 28, 2018, 1:53pm UTC](https://discourse.processing.org/t/what-does-get-return/3069 "2018-08-28T13:53:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![malaJ0](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@malaJ0](https://discourse.processing.org/u/malaJ0)\
**Post date:** [August 28, 2018, 1:53pm UTC](https://discourse.processing.org/t/what-does-get-return/3069/1 "2018-08-28T13:53:04Z")

</div>

Hey everyone,

I’m trying to figure out what does get() return when you use it with 4 arguments - as referred to at [processing References](https://processing.org/reference/get_.html).  
Does it return a matrix of w\*h dimension, while x and y is the position of the targeted pixel and w and h are around it? it’s a matrix how can one access these data?

Arguments **w** and **h** being arguments used in get(x, y, w, h)?

---

<div class="post-metadata">

**Author:** ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)\
**Post date:** [August 28, 2018, 1:56pm UTC](https://discourse.processing.org/t/what-does-get-return/3069/2 "2018-08-28T13:56:47Z")

</div>

If you read a bit more you’ll see that:

```auto
Returns	int or PImage

```

So if you specify a width and a height you get a PImage corresponding to the part of the original PImage where the top left pixel is at (x, y) position with a width of w and a height of h

---

<div class="post-metadata">

**Author:** ![malaJ0](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@malaJ0](https://discourse.processing.org/u/malaJ0)\
**Post date:** [August 28, 2018, 5:14pm UTC](https://discourse.processing.org/t/what-does-get-return/3069/3 "2018-08-28T17:14:17Z")

</div>

Thanx! That was actually super helpful… The last sentence should totally be included in the documentation!

Cheers!  
malaJ0
