Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9293017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T21:01:31+00:00 2026-06-18T21:01:31+00:00

I want to compress a jpeg image, that is, decrease its resolution, without resizing

  • 0

I want to compress a jpeg image, that is, decrease its resolution, without resizing it in any way. Is there any good Java library that will help me doing it? There are lots of similar posts in SO, but most of them end up resizing the image as well.

If not, how can I do it programatically? Say, for an argument of 0.9, the image’s resolution will decrease by a factor of 0.1…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T21:01:32+00:00Added an answer on June 18, 2026 at 9:01 pm

    Typically “resolution” means size. Do you mean the JPEG quality instead? That is the only way I can think of to compress it without resizing it.

    If so, you can use the Java2D ImageIO API. Something like the following would work (adapted from this page):

    BufferedImage bufferedImage = ImageIO.read(...);
    
    ImageWriter writer = (ImageWriter)ImageIO.getImageWritersByFormatName("jpeg").next();
    ImageWriteParam iwp = writer.getDefaultWriteParam();
    iwp.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
    iwp.setCompressionQuality(...);
    
    File file = new File(...);
    FileImageOutputStream output = new FileImageOutputStream(file);
    writer.setOutput(output);
    IIOImage image = new IIOImage(bufferedImage, null, null);
    writer.write(null, image, iwp);
    writer.dispose();
    

    Unfortunately, I don’t think there’s a way to get the existing JPEG quality of an image, so you’ll have to use some fixed value for the compression quality.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to compress a file in debian 6.0 without installing any extra tools
I want to compress an image using JPEG encoder and instead of writing it
I want to send image data from android client to the server. But there
I want to compress an NSString. How I can do that in objective-c (iphone).
I want to make image size smaller then its original size.I am using following
I have a text file that I want to compress after it gets an
I want to convert image to base 64 encode to string. from that to
Hai guys, I want compress my images without changing the quality... Because my web
I have a site with about 1500 JPEG images, and I want to compress
I have an array dump that I want to compress into a string that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.