Results 1 to 3 of 3
  1. #1
    AndrewM16921 is offline Senior Member
    Join Date
    Jan 2009
    Location
    CA, USA
    Posts
    264
    Rep Power
    6

    Default Single pixel from Image or Graphics or similar

    Hi, I'm writing a program where I need to be able to examine the color of a single pixel of the canvas I'm drawing on to determine how certain aspects of the program react. Image and Graphics don't seem to have any methods specifically for doing this... so how would I go about it?

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,963
    Rep Power
    8

    Default Re: Single pixel from Image or Graphics or similar

    Check out the getRGB() methods of BufferedImage. The API is your friend: BufferedImage (Java Platform SE 6)
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: Single pixel from Image or Graphics or similar

    BufferedImage.getRGB()?

    ETA: Curses...ninja'd!

Similar Threads

  1. Scanning Image Pixel by Pixel
    By the_transltr in forum Advanced Java
    Replies: 5
    Last Post: 08-28-2012, 04:01 PM
  2. Identify pixel in the image.
    By Maiquelnet in forum Java 2D
    Replies: 2
    Last Post: 11-12-2009, 07:55 PM
  3. Replies: 14
    Last Post: 04-10-2009, 08:46 AM
  4. how to get rgb value each pixel of an image file
    By tOpach in forum New To Java
    Replies: 1
    Last Post: 03-28-2009, 04:38 PM
  5. Replies: 1
    Last Post: 07-17-2007, 04:10 AM

Posting Permissions

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