展开全部
你指的图片取色是显示于屏幕上后再取色,相当与屏幕上指定点取色;还是读取文件内容,再自己分析,从而得到指定点的颜色?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Command1_Click()
Dim c As Long, r As Byte, g As Byte, b As Byte
Picture1.AutoRedraw = True
Picture1.AutoSize = True
Picture1.Appearance = 0
Picture1.BorderStyle = 0
Picture1.ScaleMode = 3
Picture1.Picture = LoadPicture("e:\tmp\cd1.gif")
c = Picture1.Point(100, 100)
r = c And &HFF&
g = (c And &HFF00&) / &H100&
b = (c And &HFF0000) / &H10000
MsgBox "点(100,100)的颜色值为" & c & vbCrLf & "分解后的RGB分量分别是:R=" & r & " G=" & g & " B=" & b
End Sub
Dim c As Long, r As Byte, g As Byte, b As Byte
Picture1.AutoRedraw = True
Picture1.AutoSize = True
Picture1.Appearance = 0
Picture1.BorderStyle = 0
Picture1.ScaleMode = 3
Picture1.Picture = LoadPicture("e:\tmp\cd1.gif")
c = Picture1.Point(100, 100)
r = c And &HFF&
g = (c And &HFF00&) / &H100&
b = (c And &HFF0000) / &H10000
MsgBox "点(100,100)的颜色值为" & c & vbCrLf & "分解后的RGB分量分别是:R=" & r & " G=" & g & " B=" & b
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询