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 669579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:09:58+00:00 2026-05-14T00:09:58+00:00

The title says enough I think. I have a full quality BufferedImage and I

  • 0

The title says enough I think.
I have a full quality BufferedImage and I want to send it through an OutputStream with a low
bitdepth. I don’t want an algorithm to change pixel by pixel the quality, so it is still a full-quality.

So, the goal is to write the image (with the full resolution, full size) through the OuputStream which takes a very little number of bytes to write.

Thanks,
Martijn

  • 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-05-14T00:09:59+00:00Added an answer on May 14, 2026 at 12:09 am

    You need to encode the image data into the format that has the right characteristics for your image. If it’s 24-bit color and has a lot of colors and you want to lose no quality, you are probably stuck with PNG, but look into lossless JPEG 2000.

    If you can lose some quality, then try

    1. Lossy JPEG 2000 — much smaller than JPEG for the same quality loss
    2. reducing the number of colors and using a color mapped format

    If the image has only gray or black and white data, make sure that you are encoding it as such (8-bit gray or 1-bit black and white). Then, make sure you use an encoder that is tuned for that kind of format (for example TIFF with Group 4 or JBIG2).

    Another good option is to remove all of the unwanted meta-data from the image (or make sure that your encoder doesn’t put any in).

    If you want to stick with what’s in Java, you probably have to use TIFF, PNG or JPEG — there are third party image endcoders (for example, my company, Atalasoft, makes a .NET version of these advanced encoders — there are Java vendors out there as well)

    FYI: reducing bit depth usually means reducing quality (unless the reduction is meaningless). For example if I have a 24-bit color image, but all of the colors are gray (where R==G==B), then reducing to 8-bit gray does not lose quality. This is also true if your image has any collection of 256 different colors and you switch to a color mapped (indexed or paletted) format. You reduce the number of bytes and don’t reduce quality.

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

Sidebar

Related Questions

The title says it mostly. If I have an object in Python and want
Like the title says, I want to have a HTML table that allows its
The title says it: I have an excel Sheet with an column full of
As title says, I have a list of words, Like stopWords = [the, and,
As title says. I want to perform and order by on a list -
As title says, I have access to the current listitem - and it's easy
As title says, is there a way to send form when element outside of
Sorry the title isn't clear enough. I don't know how to express it, but
Basically what the title says... I need to have an image that when clicked,
Title says it mostly. I want to add a simple extension method to the

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.