Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Getting pixels from an image, and saving them in an array?

  1. #1
    Junior Member
    Join Date
    Apr 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Getting pixels from an image, and saving them in an array?

    I was watching notch's "Making of Metagun", and The way that he made his maps was by making an image, where each color in the image creates a different thing in the game. If he wanted to change the map, all he had to do is edit the image. I want to use this for a game I am making, so How would I get pixels from an image, and then put them into an array?

    Is there something to do this already?

    Thanks.


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Getting pixels from an image, and saving them in an array?

    If you haven't yet, see the following tutorial: Lesson: Working with Images (The Java™ Tutorials > 2D Graphics)

Similar Threads

  1. How Convert a Byte array to a image format
    By perlWhite in forum Algorithms & Recursion
    Replies: 7
    Last Post: February 19th, 2011, 03:16 PM
  2. [SOLVED] Coloring Pixels
    By Javajava in forum Java SE APIs
    Replies: 2
    Last Post: July 7th, 2010, 04:02 PM
  3. Array to image
    By oxxxis in forum Collections and Generics
    Replies: 1
    Last Post: January 19th, 2010, 06:46 PM
  4. Saving an image file (PGM format)
    By Mickey2315 in forum Algorithms & Recursion
    Replies: 3
    Last Post: September 12th, 2009, 01:18 AM
  5. Obtaining straightline pixels
    By base2coder in forum Java Theory & Questions
    Replies: 4
    Last Post: September 11th, 2009, 01:58 AM