Processing Workshop #3

Todays lesson was managing to upload images as well as how to scale them. I managed to implement this by doing the setup and draw function while adding the image function within the setup that way the software knows where the image is and where to access it.

here is the example of the code:

PImage img1;
void setup() {
img1 = loadImage(“name of the file”);

size(img1.width, img1.height);
background(0);
}

DBZ2

From here i learned about image pixels and how they worked within processing when it comes to positioning and selecting specific areas of the image, so therefore i looked at how the images were placed using this reference from processing to help guide me:

pixelarray2d

 By uploading the image and allowing a basic understanding of pixel manipulation i managed to create all the pixels to have a wiggle effect by giving the image a continuous loop through each pixel and setting them at random to allow the effect to come into motion:

output_fVRKFT

By accessing this knowledge of pixels i was able to learn more basic processing functions as well as what they can do therefore in future im hoping to see what other tricks ill be able to learn.


References

Processing (2014). Processing: Images And Pixels [online]. Available from: https://processing.org/tutorials/pixels/ [Accessed 19 October 2014].

Advertisements