I've been looking through Graphics, Graphics2D and can't seem to find
what I need.
I'm looking for a method that takes an image and 4 coordinates that
identify a subset of that image.
But all the methods that I find are restricted to a rectangular shape.
Is there a method that takes in an arbitrary 4-sided shape subset of
the original image and outputs those pixels in a rectangular shape?
i.e. I have a 100x100 image. I want the subset of (0,0),(0,50),
(100,0),(100,25) of the original image to be sampled and outputted to
a new 100x100 image.
Thanks.
Daniel Pitts - 19 Nov 2007 19:31 GMT
> I've been looking through Graphics, Graphics2D and can't seem to find
> what I need.
[quoted text clipped - 10 lines]
>
> Thanks.
Look at the AffineTransformation class.

Signature
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
Hunter Gratzner - 19 Nov 2007 19:51 GMT
On Nov 19, 6:47 pm, sejong...@yahoo.com wrote:
> I'm looking for a method that takes an image and 4 coordinates that
> identify a subset of that image.
http://java.sun.com/javase/6/docs/api/java/awt/image/BufferedImage.html#getSubim
age(int,%20int,%20int,%20int)
sejong510@yahoo.com - 19 Nov 2007 22:37 GMT
> On Nov 19, 6:47 pm, sejong...@yahoo.com wrote:
>
> > I'm looking for a method that takes an image and 4 coordinates that
> > identify a subset of that image.
>
> http://java.sun.com/javase/6/docs/api/java/awt/image/BufferedImage.ht...)
Thanks for the response, but in my original post I stated a NON-
rectangular transformation.
Daniel, its almost what I need but unfortunately the coordinates are
not restricted to an affine transformation. A method that would allow
projective transformations would be great.
If anything, I can just go through the image and resize it by assuming
each column is an image 1 x height and stitching it back together.
Was just wondering, if there was a built in method to do this.