请问如何读取图片的像素数据。

devilmarshel 2009-03-03 06:48:33
RTRTRT.

请指教。。。。。
...全文
184 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
mouse1984dog 2009-03-04
  • 打赏
  • 举报
回复
什么格式的栅格啊,可以弄成一个二维数组
yihan7h 2009-03-04
  • 打赏
  • 举报
回复
HBITMAP bm;(将你的图片选入)
获得bm.width 和bm.height

GetPixel遍历(0,0)至(bm.width,bm.height)
-----------------------------------------------
COLORREF GetPixel(
HDC hdc,
int nXPos,
int nYPos
);
Parameters
hdc
[in] Handle to the device context.
nXPos
[in] Specifies the logical x-coordinate of the pixel to be examined.
nYPos
[in] Specifies the logical y-coordinate of the pixel to be examined.
Return Values
The RGB value of the pixel indicates success. CLR_INVALID indicates that the pixel is outside of the current clipping region.

儿大不由爷 2009-03-03
  • 打赏
  • 举报
回复
看是什么格式的了

7,655

社区成员

发帖
与我相关
我的任务
社区描述
Windows Phone是微软发布的一款手机操作系统,它将微软旗下的Xbox LIVE游戏、Zune音乐与独特的视频体验整合至手机中。
社区管理员
  • Windows客户端开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧