How can I automatically resize an image ? I mean, is there a simple way (in Java) to do it? If not, do you know any software that can be used to do it ? The result must be an image lighter if smaller (not like HTML does!)
You might try PaintShop Pro. You can resize images, increase or decrease the color depth, etc. It supports all of the popular image formats. I believe there used to be a free download (30 day trial) available from their site at:
Thanks but...I haven't been clear enought, sorry. In fact, I want to avoid to do this task manually. What I want is a kind of java function that can do the resizing automatically. Something like :
public File resizeImage(File initialImage, int newLong, int newLarg)
{
.
.
.
}
and the result must be the same image but with another format.
I know that there is no easy way to do that, but I expected that someone knew a good program that can be INTEGRATED in my function...
Ok thank you very much, I tried the code and it seems to work except that now I have an Image object and I must convert it into a byte[] one so that I can record the newly resized image in a data base...
Is there a possibility to do this conversion or will I have to look for another way to do that???
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.