PImage get/set

edited July 2014 in How To...

I have an image that I want to stretch in a progressive way, by which I mean, the stretch of the pixels increases the farther from the left (0) the stretch gets, (where x = pow(x, 2)/100).

So I import the image, loadPixels, and then I get stuck. I know I need a for loop where I'm looping through the pixels, and increasing the pixel distance from the left (0) with each loop, but I'm just not sure how to write this.

Do I get the pixels, and then set them at a new location?

Answers

Sign In or Register to comment.