Monday , 4 May 2015
Pakar SEO

Pengolahan Citra Kuantisasi dengan C#

clip_image004_thumb.jpg

objBitmap4 = new Bitmap(objBitmap); for (int x = 0; x < objBitmap.Width; x++) for (int y = 0; y < objBitmap.Height; y++) { Color w = objBitmap.GetPixel(x, y); int r = w.R; int g = w.G; int b = w.B; int xg = (int)((r + g + b) / 3); int xk = 16 * (int)(xg / 16); Color new_w ... Read More »

Pengolahan Citra Black White C#

clip_image002_thumb.jpg

objBitmap3 = new Bitmap(objBitmap); for (int x = 0; x < objBitmap.Width; x++) for (int y = 0; y < objBitmap.Height; y++) { Color w = objBitmap.GetPixel(x, y); int r = w.R; int g = w.G; int b = w.B; int xg = (int)((r + g + b) / 3); int xbw = 0; if (xg >= 128) xbw = ... Read More »

Pengolahan Citra Grayscale (Rata-rata RGB) C#

clip_image002.jpg

objBitmap2 = new Bitmap(objBitmap); for (int x = 0; x < objBitmap.Width; x++) for (int y = 0; y < objBitmap.Height; y++) { Color w = objBitmap.GetPixel(x, y); int r = w.R; int g = w.G; int b = w.B; int xg = (int)((r + g + b) / 3); Color new_w = Color.FromArgb(xg, xg, xg); objBitmap2.SetPixel(x, y, new_w); } ... Read More »

Efek Sephia C#

clip_image001_thumb.png

objBitmap8 = new Bitmap(objBitmap); for (int x = 0; x < objBitmap.Width; x++) for (int y = 0; y < objBitmap.Height; y++) { Color w = objBitmap.GetPixel(x, y); Color new_w = Color.FromArgb((byte)(w.R), (byte)(w.R * 0.95), (byte)(w.R*0.5)); objBitmap8.SetPixel(x, y, new_w); } pictureBox8.Image = objBitmap8; Penjelasan Code: Rumus yang saya gunakan untuk mendapatkan efek sephia adalah (R*1 , R*0.95, R*0.5). Untuk mendapatkan ... Read More »

Grayscale Berdasarkan Layer Warna C#

clip_image006.jpg

2.1 Source Code a. Grayscale Red objBitmap5 = new Bitmap(objBitmap); for (int x = 0; x < objBitmap.Width; x++) for (int y = 0; y < objBitmap.Height; y++) { Color w = objBitmap.GetPixel(x, y); Color new_w = Color.FromArgb(w.R, w.R, w.R); objBitmap5.SetPixel(x, y, new_w); } pictureBox5.Image = objBitmap5; b. Grayscale Green objBitmap6 = new Bitmap(objBitmap); for (int x = 0; x ... Read More »