Click here to Skip to main content
13,048,406 members (142,699 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hello codeproject,

I want a component to display the image in matrix, I have not found,
how transforms (listbox, listview, textbox and dataview) to a matrix to desplay the image values...

Thank you friends
Posted 15-Dec-11 23:03pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You need to keep a DataList control with repeat column="n" and rows="n" & bind only (n*n)images dataItem , where dim of matrix is n.

I hope its help you.
pablo ramos1 16-Dec-11 9:01am
give me an exemple plz i'm begainner
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Have a look at similar question with solution
How to convert image to pixel matrix in C#?[^]
Convert Bmp image to matrix[^]

from Reference link :-
public Color[][] GetBitMapColorMatrix(string bitmapFilePath)
          bitmapFilePath = @"YourImage";
            Bitmap b1 = new Bitmap(bitmapFilePath);
           int hight = b1.Height;
           int width = b1.Width;
            Color[][] colorMatrix = new Color[width][];
            for (int i = 0; i < width; i++)
               colorMatrix[i] = new Color[hight];
                for (int j = 0; j < hight; j++)
                    colorMatrix[i][j] = new Color();
                   colorMatrix[i][j] = b1.GetPixel(i, j);
            return colorMatrix;

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 16 Dec 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100