Hello guys, need a little more advice here unfortunately I'm not allowed to use java1.3 so I need to do it old fashion way.
I tried the perspective resize with an algorithm that Jerry kindly passed me, the way I do it now is 1.grab the pixels from the original image into a int[] 2.create a MemoryImageSource with it 3.apply the transform algorith to the pixels array 4.call newPixels to refresh the display of the image. the prob is that is too slow yet, because the algorithm scans and modifies pixels one by one. In my case I'm converting a 320x180 image, so the code inside the loop would be executed 57,600 times for each refresh. (accessing the int array one by one). Of course if I try with a smaller image, let's say 100x100 everything's ok. I would really like to use JAI, but that would make the user to download the JavaPlugin and the JAI JRE, (10megs total). The application I'm developing is already done in C++ (activeX) and my goal is to do it in java. I saw the image conversion code in c++ that is done in a dll, and also has a lot of iteration, but runs smooth. I suppose this must be because c++ code is more "native" right? well, any recomendations are appreciated thanks ----- Original Message ----- From: "Brian Burkhalter" <[EMAIL PROTECTED]> To: "Jonathan Sosa" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, December 20, 2001 6:58 PM Subject: Re: [JAVA2D] irregular image resize > Jonathan, > > > Brian, Jerry, Karsten > > thank you very much for your recomendations. I was surprised how much > > support I got. > > You're welcome! > > > Karsten, > > I don't think the stipes solution applies to my prob, because I need to > > apply this effect to the frames of a playing movie too (opened with > JMF). So > > the conversion need to be fast. > > Please note that the sample code download bundle of the aforementioned JAI > API includes source code for a JMF interoperability demo. An earlier > version of this demo is also available in the jai-interest discussion list > archives at: > > http://swjscmail1.java.sun.com/cgi-bin/wa?A2=ind0104&L=jai-interest&P=R10519 > > Also note that polynomial and grid warping is natively accelerated in JAI. > > Regards, > > Brian =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
