Results 1 to 2 of 2

Thread: RGB Value of selected pixel in an image?

  1. #1
    Join Date
    Nov 2004
    Centennial, CO

    RGB Value of selected pixel in an image?

    I'd like to know how to determine the RGB value of a selected pixel of a loaded image (similar to the eyedropper tool in Photoshop). Given the x and y coordinates from the mouse cursor, I need the RGB value being displayed.

    The RGB value returned can be in one Hex #value or in separate red, green, and blue variables.

  2. #2
    Join Date
    Jan 2004
    Melbourne, Australia
    Take a look at the BufferedImage class in the J2EE documentation. The getRGB(int x, int y) method may be what your looking for. The Raster class may also be helpful.


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles