none rect-linear image transforms

I'm working on a project mainly for my faculty where I have developed some image transforms in matlab. I would now like to implement these transforms in java (as an applet)

the problem is that I can't find a way to get the image matrix. i have tried to use the PixelGrabber but after changing the information in the matrix and i paint to the screen (actually, first an offscreenBuffer then screen) the image isn't transformed. somehow the original picture is still painted.

i need a way to get hold of the image matrix, make changes to it, and finally paint it on the screen. if anyone knows a way to do this i would just love to know.

affinetransforms cannot be used since they are limited to rect-linear. JAI and JAVA3D is without question due to their lack of support in browsers.

-Pr

[828 byte] By [parkragsterman] at [2007-9-26 2:10:36]
# 1

Did you succesfully grab the pixels from the image?

After you have modified the pixel array you need to create a new image from it. This can be done with eg. java.image.MemoryImageSource - there is an example in the API docs. In short: Image newImg = createImage(new MemoryImageSource(width, height, pixeldata, offset, scanwidth));

PixelGrabber gives you only a copy of the image data - not the real data. The reason to this is quite complex.

jsalonen at 2007-6-29 9:01:43 > top of Java-index,Desktop,Core GUI APIs...
# 2
thanx, that was the whole problem. i tried to put the pixel matrix back into the same image. but doing it your way of creating a new image it all worked fine...-Par
parkragsterman at 2007-6-29 9:01:43 > top of Java-index,Desktop,Core GUI APIs...