Download presentation
Presentation is loading. Please wait.
Published byGyles Randall Modified over 9 years ago
1
PImage
2
Let’s look at the PImage class in ProcessingPImage –What are the fields (i.e., variables)? –What methods are available? –What about the constructor---how many parameters does it have? There are 4 constructors each with a different number of parameters
3
Using PImage’s filter() Method PImage img; void setup() { size(100,200); img = loadImage("forest.jpg"); image(img, 0, 0); img.filter(INVERT); image(img, 0, 100); } Here are the images that you need as a zip fileimages that you need as a zip file
4
PImage’s mask() Method background(255); PImage img = loadImage("airport.jpg"); PImage maskImg = loadImage("airportmask.jpg"); img.mask(maskImg); image(img, 0, 0);
5
Modifying Pixels and HW 6 Processing program to change Pixels Image for the program HW6 –Have your program do the following Load a png or jpg image Using a mouse event, read and modify several pixels of the image Using a keyboard event, modify the entire image You must use a for loop in your program –Grading 10% Aesthetics 20% documentation and comments 20% for loop 25% reading pixels from an array 25% modifying pixels within an array
6
PImage Revisited Here’s an alternative way of looking at the documentation for PImagePImage This documentation is produced by Javadoc Javadoc Processing is implemented as a set of Java classes that accompany those normally provided with Java Can you find the line() method?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.