加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c#scan0和stride

发布时间:2020-12-16 10:29:09 所属栏目:百科 来源:网络整理
导读:任何人都知道什么是Scan0和Stride?我需要一个很好的解释谢谢. 解决方法 你在谈论 BitmapData 课吗?如果是这样,我认为文档中的描述相当清楚: Scan0 : Gets or sets the address of the first pixel data in the bitmap. This can also be thought of as t
任何人都知道什么是Scan0和Stride?我需要一个很好的解释谢谢.

解决方法

你在谈论 BitmapData课吗?如果是这样,我认为文档中的描述相当清楚:

Scan0

Gets or sets the address of the first pixel data in the bitmap. This can also be thought of as the first scan line in the bitmap.

换句话说,这可以让您找到要检查或更改的数据 – 甚至可以让您将位图设置为完全不同的数据.

Stride

The stride is the width of a single row of pixels (a scan line),rounded up to a four-byte boundary. If the stride is positive,the bitmap is top-down. If the stride is negative,the bitmap is bottom-up.

如果要从一行移动到下一行,则需要将步幅添加到当前正在查看的行的地址.行与4字节边界对齐,以便各种代码可以更有效地访问它. (CPU中的各种操作经过优化,可以在4字节或8字节边界上工作.)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读