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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:40:42+00:00 2026-06-14T18:40:42+00:00

What do the x and y parameters in the getRGB(x, y) method represent? What

  • 0

What do the x and y parameters in the getRGB(x, y) method represent? What does the numerical return value represent?

How do I identify the color of specific pixels within a BufferedImage that is displayed on a DrawingPanel? Ideally I’d like to ‘find’ a word within an image, and underline or outline this word to create a relevant hyperlink. How can I translate these numerical values into human understandable colors like ‘red’ ‘green’ or ‘blue’?

Yes, I understand that in the Color class an alpha value of 0-255 represents transparent to opaque. But what does this imply for the actual color? I’m happy to clarify if this doesn’t make sense. Thank you for reading.

  • 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-14T18:40:43+00:00Added an answer on June 14, 2026 at 6:40 pm

    The x and y coordinates represent the pixel location, x going from left to right and y going from top to bottom (both starting at 0). So (0, 0) is the upper left pixel, and (width-1, height-1) is the bottom right pixel.

    The integer value returned has the R, G, B and (potentially) Alpha values packed into a single int. Remember that an int contains 32 bits, so 8 of those bits are allocated to each of the values.

    But, if you’re not to good with shifting bits around inside an integer, the easiest thing to do is pass the integer value to the constructor of Color:

    int rgba = image.getRGB(coordinates);
    Color col = new Color(rgba, true);
    int r = col.getRed();
    int g = col.getGreen();
    ...
    

    Obviously, recognising where a word is from raw pixel values is a whole nother, quite complex, problem.

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

Sidebar

Related Questions

Query parameters : http://example.com/apples?order=random&color=blue Matrix parameters : http://example.com/apples;order=random;color=blue When should one use query parameters
I need to read parameters from Context.Request that is written in a format like:
I can pass multiple parameters and at last one block parameter to method. But
I examine the parameters of a C# method using reflection. The method has some
I am sending various parameters to batch file. In that i need the parameter
I am sending parameters from c# to the mysql database. Problem is that I
What are the parameters n, e, d, p, q represent in below RSA structure
I want to find parameters for some CRC-24 algorithm. All I know is that:
I've got parameters I'm currently setting in ApplicationSettings.cfm and ThisSettings.cfm that I'm including into
How do I test parameters inside a method itself. For example class TestClass {

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.