# How to get multiple image pixel array

**URL:** <https://discourse.processing.org/t/how-to-get-multiple-image-pixel-array/12382>\
**Category:** Coding Questions\
**Created:** [June 29, 2019, 2:22pm UTC](https://discourse.processing.org/t/how-to-get-multiple-image-pixel-array/12382 "2019-06-29T14:22:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![The\_nish](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/the_nish/32/5634_2.png) [@The\_nish](https://discourse.processing.org/u/The_nish)\
**Post date:** [June 29, 2019, 2:22pm UTC](https://discourse.processing.org/t/how-to-get-multiple-image-pixel-array/12382/1 "2019-06-29T14:22:53Z")

</div>

…post is deleted

---

<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:** [June 29, 2019, 3:52pm UTC](https://discourse.processing.org/t/how-to-get-multiple-image-pixel-array/12382/2 "2019-06-29T15:52:02Z")

</div>

> [@The\_nish](#):
>
> tell me what i do.

Research:

> **[Variable Scope / Examples](https://processing.org/examples/variablescope.html)**
>
> Variables have a global or local "scope". For example, variables declared within either the setup() or draw() functions may be only used in these functions. Global variables, variables declared outsid…

Please make an effort to clean up your code and format it before posting.

🙂

---

<div class="post-metadata">

**Author:** ![The\_nish](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/the_nish/32/5634_2.png) [@The\_nish](https://discourse.processing.org/u/The_nish)\
**Post date:** [June 30, 2019, 4:31am UTC](https://discourse.processing.org/t/how-to-get-multiple-image-pixel-array/12382/3 "2019-06-30T04:31:06Z")

</div>

I know what is variable scope.  
But when I use j value outside the loop. Where I use image[j] outside the loop I get error.  
Index out of bound.
