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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:22:32+00:00 2026-06-08T01:22:32+00:00

I am able with an BufferedImage to obtain the RGB values for every pixel

  • 0

I am able with an BufferedImage to obtain the RGB values for every pixel of a 640×640 image, the output looks like this:

[...]
Pixel :(640, 634) RGB: 166 94 82
Pixel :(640, 635) RGB: 166 94 80
Pixel :(640, 636) RGB: 163 91 77
Pixel :(640, 637) RGB: 157 88 73
Pixel :(640, 638) RGB: 157 88 73
Pixel :(640, 639) RGB: 159 90 74
Pixel :(640, 640) RGB: 158 89 73
This image has 69197 colors.

I need to classify each of the RGB colors obtained this way into 3-bit RGB (8 colors), I would need to have an idea on how to do this… How to know the range of RGB for each of the 8 colors of the 3-bit RGB. Thanks!

  • 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-08T01:22:35+00:00Added an answer on June 8, 2026 at 1:22 am

    Your resulting image will have 1 bits for each color component.

    For red for instance you should do this:

     red1Bit = redOriginal > 127 ? 1 : 0;
    

    You should do the same for blue and green as well.

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

Sidebar

Related Questions

I need to be able to load RGB pixel values at a certain resolution
I would like to be able to paint Image s onto a JFrame ,
Not able to store all binary data values into sqlite3 table using QT. For
not able to get this, can someone help for this LINQ query? select col1,
I am not able to understand how to rotate the image. I am trying
I want to be able to take an image that i have already captured
I want to add an image to a frame but I am not able
I am trying to resized a bufferedimage. I am able to store it and
i have this little program for showing images on apanel.. but i'm not able
I'm trying to serve an image in my application as a java.awt.BufferedImage object. When

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.