Tugas Citra 2
Tugas Citra 2
MK 411
Nama : Reynold Andika
NIM : 4212001011
Laporan minggu ke :2
Hari, tanggal : Thursday, 10 March 2022
Waktu : 16:02:44
namespace Tugas_citra_kedua_Rey
{
public partial class Form1 : Form
{
}
//converting RGB to Three Channel GBR
private void threeChannelImageGBR()
{
//avoiding if the source image is null
if (sourceImage == null) return;
Bitmap greenblueredChannel = new Bitmap(sourceImage);
for (int x = 0; x < imageWidth; x++)
for (int y = 0; y < imageHeight; y++)
{
//get the RGB value of the pixel at (x,y)
Color w = sourceImage.GetPixel(x, y);
byte r = w.R; //red value