# Reading pixels from an image

**URL:** https://discourse.processing.org/t/reading-pixels-from-an-image/31592
**Category:** Coding Questions
**Created:** [August 6, 2021, 7:48am UTC](https://discourse.processing.org/t/reading-pixels-from-an-image/31592 "2021-08-06T07:48:57Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![Kiliad](https://avatars.discourse-cdn.com/v4/letter/k/ed655f/32.png) [@Kiliad](https://discourse.processing.org/u/Kiliad)
#### Post date: [August 6, 2021, 10:40am UTC](https://discourse.processing.org/t/reading-pixels-from-an-image/31592/7 "2021-08-06T10:40:23Z")

</div>

Ok, here is one attempt.

let img;  
let x;  
let y;

function setup() {  
createCanvas(720, 400);  
img = loadImage(‘data/moonwalk.jpg’);

}

function processit() {

for (let x = 0; x \< 720; x++) {  
for(let y = 0;y \< 400; y++) {  
col=img.get(x,y);  
stroke(col);  
point(x,y);

```
  }

```

}  
}

function draw() {

}

---

_[View the full topic](https://discourse.processing.org/t/reading-pixels-from-an-image/31592)._
