As I stated in my revised .02 schedule, I am working on PImage. I have been playing around with it but unfortunately I haven’t been able to get the image on the screen. Here is a run down of PImage:
My firs task if the constructor. The constructor either excepts: 0 parameters, the height and width, the height and width and format, or an image. I decided to tackle the constructor that accepts and image. This seemed simple enough as the image being passed in already has the width, height, format, and pixel array. Now here is the hard part, how do you get the pixel array? From all of the references I have read I get the impression that before you can load any pixels, you first have to use the loadPixels() which actually takes the pixels on the screen and stores them in an array. From this perspective though, the image should already be displayed on the screen. So i am following these steps;
- load image using loadImage(“name.ext”) this returns a var img
- create PImage by passing it the var img created above
- display the image on the screen image(img,0,0)
- calling the PImage loadPixels()
- display the PImage on the screen
Unfortunately, I get nothing. I will let everyone know once its finally working though.