File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Game Development and the fly likes How to copy image with given points? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Game Development
Bookmark "How to copy image with given points? " Watch "How to copy image with given points? " New topic

How to copy image with given points?

au lai seong

Joined: Mar 06, 2011
Posts: 14
How to copy/crop with given points? The number of point maybe more than 4.
Jj Hill
Ranch Hand

Joined: Jul 25, 2011
Posts: 41

What do you mean by points? The standard image classes just have one point, with an (x, y) location. Please be more specific.
Stephan van Hulst

Joined: Sep 20, 2010
Posts: 4199

I'm thinking the original poster wants to define a polygon, and create a new image that is the intersection of the original image and the polygon.

Take a look at the Graphics class. You can get an instance of it from an instance of Image.

The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
I agree. Here's the link:
subject: How to copy image with given points?
It's not a secret anymore!