Results 1 to 7 of 7
  1. #1
    iTyGuy32 is offline Member
    Join Date
    Jul 2011
    Posts
    5
    Rep Power
    0

    Default Java PNG problem

    So I'm making a little Java project with a few other people, and one of the features that is necessary, we don't know how to do. I'll try to explain it the best I can, and see if you know what Java syntax could be used.

    Basically the program will load a png image.

    After the Image is loaded, the program will look at the first pixel of the image, and then do something based on the rgba value of it.'

    Then it moves to the next pixel and repeats until it's looked at all of the pixels.

    I understand how to load images, but I'm not sure how to look at the exact pixels, nor do I know what to google, so I'm looking for help here, thanks!

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,331
    Rep Power
    25

    Default

    Look at the PixelGrabber class and the BufferedImage class. They both have ways to get at the RGB values for a image byte.

  3. #3
    iTyGuy32 is offline Member
    Join Date
    Jul 2011
    Posts
    5
    Rep Power
    0

    Default

    Quote Originally Posted by Norm View Post
    Look at the PixelGrabber class and the BufferedImage class. They both have ways to get at the RGB values for a image byte.
    That's just what I needed, but could you give a little example of how to use it? JavaDocs aren't exactly the most understandable thing in the world.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,331
    Rep Power
    25

    Default

    a little example of how to use it
    Use Search here or Google

  5. #5
    iTyGuy32 is offline Member
    Join Date
    Jul 2011
    Posts
    5
    Rep Power
    0

    Default

    I'm so lost with pixel grabber, it just isn't working for me, any help?

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,331
    Rep Power
    25

    Default

    You forgot to post the code you are having problems with.

  7. #7
    iTyGuy32 is offline Member
    Join Date
    Jul 2011
    Posts
    5
    Rep Power
    0

    Default

    EDIT: I figured it out! I just had to include the full path of the image. Looks like I gotta work on my File IO to fix that!
    Last edited by iTyGuy32; 07-16-2011 at 09:58 PM.

Similar Threads

  1. Replies: 4
    Last Post: 03-16-2012, 11:29 AM
  2. java problem!
    By nini86 in forum New To Java
    Replies: 7
    Last Post: 05-30-2011, 02:42 PM
  3. Java url problem
    By sharifiit in forum Networking
    Replies: 0
    Last Post: 04-30-2011, 07:52 PM
  4. Problem Display Jmenubar Java Se6 u23 versus Java SE6 u22
    By Ravanelly in forum Advanced Java
    Replies: 0
    Last Post: 01-07-2011, 09:36 AM
  5. Problem with Java...
    By mc6415 in forum New To Java
    Replies: 10
    Last Post: 02-22-2010, 12:24 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
  •