如何在矩阵中显示图像? [英] How to show image in matrix?

查看:79
本文介绍了如何在矩阵中显示图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,代码项目,

我希望组件以矩阵形式显示图像,但我还没有找到,
如何将(列表框,列表视图,文本框和数据视图)转换为矩阵以显示图像值...

谢谢朋友

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

推荐答案

您需要保留一个DataList控件,该控件具有重复的column ="n"和rows ="n"&仅绑定(n * n)个图像dataItem,其中矩阵的暗淡为n.

希望对您有帮助.
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.


看看类似的问题与解决方案
如何在C#中将图像转换为像素矩阵? [ ^ ]
将Bmp图像转换为矩阵 [ ^ ]

来自参考链接:-
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;

        }


这篇关于如何在矩阵中显示图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆