aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes image zoom Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "image zoom" Watch "image zoom" New topic
Author

image zoom

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
I want to zoom in an image. I want user to click a point in the image, then I need to enlarge the image based on the point user click. That point should be the center in the new enlarged image.

How could I do that ?

Thanks
Lou Pellegrini
Ranch Hand

Joined: Nov 11, 2003
Posts: 142
    
    1
The ButtonSizing class posted by Craig Wood may help get you started, particularly method private Image getScaledImage(BufferedImage image, double scale).
http://www.coderanch.com/t/338181/GUI/java/JButton-ImageIcon-Size

Add on a MouseListener to get the MouseEvent and you should be able to size your image from the x/y of the click from the MouseEvent.

Hope it works for you.

Lou
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: image zoom
 
Similar Threads
zooming in
Image resizing
General Question Regarding Image Processing
Resize Image Icon
image zoom-in