我想读取一张BMP的所有点的颜色,用下面的代码。
为什么我的机器可以,别人就不行?
是不是要将GetDC(Picture1.hwnd ) 改掉?
谢谢!
for LngY = 0 To bmp.bmHeight
For LngX = 0 To bmp.bmWidth
strType = ""
lngResult = GetPixel(GetDC(Picture1.hwnd), CLng(LngX), CLng(LngY))
Next
Next
为什么我的机器可以,别人就不行?
是不是要将GetDC(Picture1.hwnd ) 改掉?
谢谢!
for LngY = 0 To bmp.bmHeight
For LngX = 0 To bmp.bmWidth
strType = ""
lngResult = GetPixel(GetDC(Picture1.hwnd), CLng(LngX), CLng(LngY))
Next
Next
现在好了,就是这个问题。
如果是真彩色,如何读?
非常感谢。
解决方法可以用GetDIBits函数
为什么不看
还在这里浪费分文章:
http://expert.csdn.net/Expert/topic/2072/2072972.xml?temp=.9880182