This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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
It's not a secret anymore!