Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace conv
- {
- public partial class Form1 : Form
- {
- Bitmap image;
- Bitmap mask;
- public Form1()
- {
- InitializeComponent();
- }
- private void groupBox1_Enter(object sender, EventArgs e)
- {
- }
- private void button1_Click(object sender, EventArgs e)
- {
- image = new Bitmap(@"Z:\\cat.jpg", true);
- pictureBox1.Image = image;
- }
- private void button2_Click(object sender, EventArgs e)
- {
- // mask = new Bitmap(@"Z:\\cat.jpg", true);
- // pictureBox2.Image = mask;
- for (int i = 0; i < mask.Height; i++) {
- for (int j = 0; j < mask.Width; j++)
- {
- Color c = mask.GetPixel(i, j);
- int red = c.R;
- int green = c.G;
- int blue = c.B;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement