[Processing BETA + JMyron]
**********************************
A little variation to work with image files
(jpg,gif,bmp,tiff... or jpg at least) adding another methods
to work with files (void startIMG(w,h, int[] newimage) and
void stopIMG()).
For example:
import JMyron.*;
PImage pimg;
int[] pximg;
JMyron m; //a image-camera object
void setup(){
pimg = loadImage("image.jpg");
size(pimg.width,pimg.height);
m = new JMyron(); //make a new instance of the object
pximg = new int[pimg.width*pimg.height];
for(int i=0;i<pximg.length;i++){ //loop through all the
pixels
pximg[i] = pimg.pixels[i];
}
m.m.startIMG(pimg.width, pimg.height, pximg); // load
the image
}
is it a hardwork?
(By the way 2 questions:
1. why not pure java?
2. hijack with Processing?)
Thanks!
Nacho. BCN.
owd [_at_] uni [_dot_] de
Logged In: NO
Ooops!
m.startIMG(pimg.width, pimg.height, pximg); // load
the image
(well, +- some like this)
nach