File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

How to resize image

rose deng
Ranch Hand

Joined: Dec 29, 2000
Posts: 78
Hi.
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:
http://java.sun.com/j2se/1.3/docs/api/java/awt/Image.html#getScaledInstance(int,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: http://aspose.com/file-tools
 
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