灰度像素字节数组 [英] Grayscale pixels byte array

查看:67
本文介绍了灰度像素字节数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个100x100的字节数组,每秒50次来自微型相机。数组中的每个字节都包含有关灰度值阴影的信息。我使用此数组中的信息绘制图像(100x100像素)。为此,我使用Rectangle.Fill方法。问题是这种方法绘制的图像非常慢,但我想以大约每秒50帧的速度绘制图像。最好的方法是什么?

I've got a byte array 100x100 which comes form a miniature camera 50 times per second. Each byte from the array contains an information about shade of grey value. I draw an image (100x100 pixels) using an information from this array. To do this I use Rectangle.Fill method. The problem is that this method draws the image very slowly, but I want to draw the image at a rate about 50 frames per second. What is the best way to do this?

推荐答案

你最好的选择可能是 DirectX [ ^ ]。然而,这不是一项微不足道的任务。
Your best bet could be DirectX[^]. Not a trivial task, however.


这篇关于灰度像素字节数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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