Advertisement
Guest User

conv

a guest
Sep 18th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9.  
  10. namespace conv
  11. {
  12. public partial class Form1 : Form
  13. {
  14.  
  15. Bitmap image;
  16. Bitmap mask;
  17.  
  18. public Form1()
  19. {
  20. InitializeComponent();
  21. }
  22.  
  23. private void groupBox1_Enter(object sender, EventArgs e)
  24. {
  25.  
  26. }
  27.  
  28. private void button1_Click(object sender, EventArgs e)
  29. {
  30. image = new Bitmap(@"Z:\\cat.jpg", true);
  31. pictureBox1.Image = image;
  32. }
  33.  
  34. private void button2_Click(object sender, EventArgs e)
  35. {
  36. // mask = new Bitmap(@"Z:\\cat.jpg", true);
  37. // pictureBox2.Image = mask;
  38.  
  39.  
  40.  
  41. for (int i = 0; i < mask.Height; i++) {
  42. for (int j = 0; j < mask.Width; j++)
  43. {
  44. Color c = mask.GetPixel(i, j);
  45. int red = c.R;
  46. int green = c.G;
  47. int blue = c.B;
  48. }
  49. }
  50. }
  51. }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement