
Adapun contoh praktikum sbb :

Listing program praktikum inversi sbb :
Private Sub Command4_Click()
For i = 1 To Picture1.Width Step 15
For j = 1 To Picture1.Height Step 15
warna = Picture1.Point(i, j)
R = warna And RGB(255, 0, 0)
G = Int((warna And RGB(0, 255, 0)) / 256)
B = Int(Int((warna And RGB(0, 0, 255)) / 256) / 256)
x10 = (R + G + B) / 3
xn = 255 - x10
Picture2.PSet (i, j), RGB(xn, xn, xn)
Next j
Next i
End Sub
No comments:
Post a Comment