2D Image Transform

I’m trying to transfrom a 2D image based on a perspective calculation. E.g. make a image look like its going off into the distance. I see JAI has a class called PerspectiveTransform which would do this for me. My home rolled attempts seem to slow. I don’t really want to be dependant on the whole of JAI for this one feature…

Is anyone else doing this, if so how and whats the performance like?

Any help appreciated,

Kev

It has been my experience that any transformation done to images at runtime would require the image to be copied from vram to system memory, perform the calcualtions and then hopefully get accelerated again sometime in the near future (assuming managed image in the first place).

I have no personal experience with PerspectiveTransformations and little with the JAI api so if that is able to do this trick in vram I’d be interested in hearing more about it.

A hack that I’ve come up with for arcade type shooter is to simply pre-transform the images and store the different sizes in and image array that is index by distance. Not perfect solution I know as your memory will start bloating quickly the more accurate you make the perspective calculations and the more images you have.