How to load image to jit.matrix

wijesijp's icon

I am writing java external application display some objects using jit.gl.sketch. I wanted to add some water effects to the scene.
I am planning to load an image to jit.matrix and manipulate the pixels to do this.

But I don't know how to load an image to jit.matrix and display it in java external.
Can anyone give me some sample code?

wijesijp's icon

Ok I found how to do it
here is the way to do it if anyone wants to know;

this is how you load the image;

JitterMatrix textureImage = new JitterMatrix();
textureImage.importmovie("Dock.jpg");

and to display;

myrender.send("erase");
myrender.send("draw_pixels", new Atom[] { Atom.newAtom(textureImage.getName()) });
myrender.send("drawswap");