ADMIN مدير منتدى الحلم
عدد المساهمات : 107 نقاط : 21155 تاريخ التسجيل : 08/11/2012 العمر : 44 الموقع : alksaey.yoo7.com
| موضوع: لتغيير الوان الصورة وجعلها نيقاتيف الأربعاء ديسمبر 04, 2013 12:03 am | |
| نكتب الحدث التالي في الكلاس Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim bmap As New Bitmap(PictureBox1.Image) PictureBox1.Image = bmap Dim red, green, blue As Integer Dim i, j As Integer With bmap For i = 1 To .Height - 2 For j = 1 To .Width - 2 red = CInt(.GetPixel(j, i).R) blue = CInt(.GetPixel(j, i).B) green = CInt(.GetPixel(j, i).G) bmap.SetPixel(j, i, Color.FromArgb(255 - red, 255 - green, 255 - blue)) Next PictureBox1.Refresh() Next PictureBox1.Refresh() End With End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub End Class | |
|