Anonymous user
Grayscale image: Difference between revisions
m
→{{header|Visual Basic}}: minor clarifications
(=={{header|Visual Basic}}== Added Visual Basic code) |
m (→{{header|Visual Basic}}: minor clarifications) |
||
Line 1,832:
{{works with|Visual Basic|5}}
{{works with|Visual Basic|6}}
{{libheader|Win32}}
<lang vb>Option Explicit
Line 1,871 ⟶ 1,872:
Set p = VB.LoadPicture("T:\TestData\Input_Colored.bmp")
hdc = CreateCompatibleDC(0)▼
GetObjectA p.Handle, Len(bmp), bmp
▲hdc = CreateCompatibleDC(0)
SelectObject hdc, p.Handle
For x = 0 To bmp.bmWidth - 1
For y = 0 To bmp.bmHeight - 1
Line 1,882 ⟶ 1,885:
Next y
Next x
VB.SavePicture p, "T:\TestData\Output_GrayScale.bmp"
DeleteDC hdc
End Sub</lang>▼
▲End Sub</lang>
=={{header|Visual Basic .NET}}==
|