Jika x<128 maka x=0, jika tidak maka x=255
Adapun contoh praktikum sebagai berikut :

Listing program diatas sebagai berikut :
Private Sub Command3_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)
x11 = (R + G + B) / 3
If x11 < 128 Then x11 = 0 Else x11 = 255
Picture2.PSet (i, j), RGB(x11, x11, x11)
Next j
Next i
End Sub
1 comment:
bisa minta tolong kirimkan script konversi ke citra biner secara lengkap pa nggak????tlong kirim ke email l.budiyantoro@yahoo.com
makasih.,.
Post a Comment