RGB values from image into a one dimension array in c#
        Posted  
        
            by 
                velocityxyz
            
        on Game Development
        
        See other posts from Game Development
        
            or by velocityxyz
        
        
        
        Published on 2013-10-31T04:22:26Z
        Indexed on 
            2013/10/31
            10:23 UTC
        
        
        Read the original article
        Hit count: 414
        
I was wondering if there is a was a way to read rgb values from an image into a one dimensional array in C#. If it doesnt make sense, in java I would do something like this.
int[] pixels;
BufferedImage image = getClass().getResourceAsStream("asdfghjkl.png");
int w = image.getWidth();
int h = image.getHeight();
pixels = new int[w * h];
image.getRGB(0, 0, w, h, pixels, 0, w) ;
So any help would be great, or if you can point me in the right direction, that'd be great
© Game Development or respective owner