How to load image to jit.matrix

May 22, 2009 at 7:23pm

How to load image to jit.matrix

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?

#44046
May 30, 2009 at 11:59am

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”);

#158186

You must be logged in to reply to this topic.