Languages
[Edit]
EN

Java - resize JPG image (high quality)

7 points
Created by:
Nikki-Mathews
517

In this short article, we would like to show how to resize image using Java.

The solution presented in the article provides quite good quality for the resized image. Resize image operation with quality is achieved by using embedded getScaledInstance() method.

Image resize concept using Java.
Image resize concept using Java.

Program.java file:

Hint: in the above example JPEG quality is set to 0.75f (it should be in the range from 0.0f to 1.0f).

 

Common util

Edit

JpegImageUtils.java file: 

 

Alternative titles

  1. Java - resize JPG image (quite good quality)
  2. Java - resize JPEG image (high quality)
  3. Java - resize JPEG image (quite good quality)
  4. Java - minify JPG image (high quality)
  5. Java - create JPG image miniature (high quality)
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join