title: How to do four-coordinate non-projective image transformation in Java?
body: <p>I'd like to transform a <code>BufferedImage</code> in Java, from a rectangle to an arbitrary convex quadrilateral, similarly to this:</p>
  
  <p><a href="https://i.stack.imgur.com/6ekEN.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6ekEN.jpg" alt="enter image description here"></a></p>
  
  <p>But instead of using projective transformation, I'd like to simply use a linear transform that stretches and squeezes the image where appropriate, according to four coordinates that I want the corners of the final image to be.</p>
  
  <p>What is the way to do this in Java?</p>
  
  <p>edit: It seems that one solution is to draw a textured Quad in GL, which is deformed as I wish, using JOGL. I'm not sure about the support and efficiency, will investigate further.</p>