Results 1 to 5 of 5
  1. #1
    diyana_25 is offline Member
    Join Date
    Apr 2012
    Location
    Indonesia
    Posts
    4
    Rep Power
    0

    Default How to convert Binary Image into Pixel and store it into 1D arrau

    I'm so new iin Java, and i have an assigment from my lecture to convert binary image into pixel and strore it into 1D array.. Anybody can help me? thanks for hep

  2. #2
    Sierra is offline AN21XX
    Join Date
    Mar 2012
    Location
    Munich
    Posts
    297
    Rep Power
    3

    Default Re: How to convert Binary Image into Pixel and store it into 1D arrau

    Post your approach and what exactly is your input - is the binary image a file or an array? You have already code given? Describe what your situation is.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,453
    Rep Power
    20

    Default Re: How to convert Binary Image into Pixel and store it into 1D arrau

    Start by finding out the format of the 'binary image' from your lecturer.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  4. #4
    diyana_25 is offline Member
    Join Date
    Apr 2012
    Location
    Indonesia
    Posts
    4
    Rep Power
    0

    Default Re: How to convert Binary Image into Pixel and store it into 1D arrau

    my input is file of image, I have to show the pixels first before I storing it in 1D array. this is my source code that I have try, but it's not working. thanks fo help me..

    public int[][] ShowPixel(){
    BufferedImage image = background;
    int[][] array = new int[background.getWidth()][background.getHeight()];
    for (int i = 0; i < background.getWidth(); i++)
    {
    for (int j = 0; i < background.getHeight(); j++)
    {
    array[i][j] = background.getRGB(i, j);
    }
    }
    return array;
    }

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,453
    Rep Power
    20

    Default Re: How to convert Binary Image into Pixel and store it into 1D arrau

    Start by finding out the format of the 'binary image' from your lecturer.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Scanning Image Pixel by Pixel
    By the_transltr in forum Advanced Java
    Replies: 5
    Last Post: 08-28-2012, 05:01 PM
  2. Replies: 1
    Last Post: 11-01-2011, 06:35 PM
  3. How to read the pixel values of a jpg binary image
    By carindia in forum New To Java
    Replies: 2
    Last Post: 09-17-2010, 07:19 PM
  4. Replies: 14
    Last Post: 04-10-2009, 09:46 AM
  5. Replies: 1
    Last Post: 07-17-2007, 05: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
  •