File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes How to resize image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to resize image" Watch "How to resize image" New topic

How to resize image

rose deng
Ranch Hand

Joined: Dec 29, 2000
Posts: 78
I want to resize image, say,the original size of the image is 800*600, i want to reduce it to 80% of original size.
How to.
Thanks for your kind help in advance.
Angela Lamb
Ranch Hand

Joined: Feb 22, 2001
Posts: 156
Here is a link to the docs for the Image method getScaledInstance:,int,in t)
It takes a new height and width for parameters, not percentage, but you should be able to calculate those yourself.
[This message has been edited by Angela Ann (edited March 29, 2001).]
I agree. Here's the link:
subject: How to resize image
Similar Threads
Retrive Exif data from jpeg Image
how to get Image from Canvas
several animation frames in one file, transparency issues
Image in JLabel
help needed to reshape an image