Results 1 to 2 of 2
  1. #1
    mester is offline Member
    Join Date
    Dec 2008
    Rep Power

    Default get image file from array of pixels

    I have array of pixels(black and white) which represent an image and I would like to save this array or this image as PNG format file and store it in external folder.

  2. #2
    Paul Richards is offline Member
    Join Date
    Oct 2008
    Rep Power


    Create a BufferedImage. Take a look at the setRGB method. The latest documentation is here: BufferedImage (Java Platform SE 6).

    You can use the write method of the ImageIO class to save to a PNG file. There is an example here: Saving a Generated Graphic to a PNG or JPEG File (Java Developers Almanac Example).

Similar Threads

  1. 2d array to image
    By Nina* in forum New To Java
    Replies: 1
    Last Post: 10-01-2008, 05:08 PM
  2. how to convert an image in to pixels
    By Shyam Singh in forum New To Java
    Replies: 7
    Last Post: 09-22-2008, 02:32 PM
  3. To open an image file such as Jpeg file using JAva Program
    By itmani2020 in forum Advanced Java
    Replies: 10
    Last Post: 07-11-2008, 10:57 AM
  4. 2D Array to image
    By fred in forum Java 2D
    Replies: 1
    Last Post: 07-24-2007, 02:52 AM
  5. Deleting certain image pixels..
    By Brightside in forum New To Java
    Replies: 1
    Last Post: 05-22-2007, 10:21 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