Brian, Jerry, Karsten thank you very much for your recomendations. I was surprised how much support I got.
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. Jerry, thank you, I'll analize you code this weekend and let you know. Karsten, I actually don't have the idea on how to program nor apply it. Since the only transformations so far I've made are with AffineTransforms (which are very simple). I imagined a though byte level calculation algorithm to resize, but was't sure. I saw this effect working perfect on an ActiveX app, and as far as I searched I didn't see any java app doing this. best regards Jonathan ----- Original Message ----- From: "Brian Burkhalter" <[EMAIL PROTECTED]> To: "Jonathan Sosa" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, December 20, 2001 4:14 PM Subject: Re: [JAVA2D] irregular image resize > Jonathan, > > I'm not sure what you are asking, i.e., how to compute the coefficients of > the transformation or how to apply it. > > As for the calculation of the transformation you would in your example > need to identify the mathematical form of the transformation and then > compute the best fit of its coefficients to the available data points. > > As for the type of transformation, you will need to use something other > than an affine mapping which inherently maps parallel lines to parallel > lines. This is not the case in what you describe as the top and bottom > of the image are no longer parallel. See for example > > http://www.cs.sunysb.edu/~oliveira/Courses/CSE528/CSE528_Slide_Set_4_Geometr ic_transf.pdf > > for a brief discussion of geometrical transformations. > > This case probably calls for a projective transformation or a specical > case thereof, the perspective transformation. The Java Advanced Imaging > API > > http://java.sun.com/products/java-media/jai/index.html > > supports the perspective transformation as well as general bivariate > polynomial and generic grid warping. > > Brian > > On Wed, 19 Dec 2001, Jonathan Sosa wrote: > > > Hello, > > > > I'm trying to resize an image (jpg) before drawing it to the graphics2d. But > > I need to apply greater ratio of resize to one of the sides of the image. > > > > supposing the original 4 corner points of the image are > > (10,10) (30,10) (30,20) (10,20) > > the normal 2X resize (and translation) would give > > (10,10) (50,10) (50,30) (10,30) > > > > but the resize I'm intended to do, keeping the left edge of the image size > > intact and resizing to right would result in > > (10,10) (40,0) (40,30) (10,20) > > > > the porpouse is to give the feeling of "entering" a corridor. Beign the > > images like the walls of the corridor. > > > > I can't use 3D graphics, must do it with 2d > > best regards > > Jonathan > > > > =========================================================================== > > 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". > > > =========================================================================== 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".
