title: Drawing lines in a PictureBox
body: <p>First I need to make some color scribbles (the picture below is taken from M. Yang article's on Still Image Colorization) on an monochrome input image which is loaded into a PictureBox control.</p>
  
  <p><img src="https://i.stack.imgur.com/L0BCR.png" alt="Enter image description here"></p>
  
  <p>I'm trying to use this to get the effect:</p>
  
  <pre><code>private void PictureBoxOnMouseDown(Object sender, MouseEventArgs e)
  {
      if((e.Button &amp; MouseButtons.Left) == MouseButtons.Left)
      {
          this.MouseInitialPosition = e.Location;
      }
  }
  
  private void PictureBoxOnMouseMove(Object sender, MouseEventArgs e)
  {
      if((e.Button &amp; MouseButtons.Left) == MouseButtons.Left)
      {
          this.MouseLastPosition = e.Location;
      }
      this._PictureBox.Invalidate();
  }
  
  private void PictureBoxOnPaint(Object sender, PaintEventArgs e)
  {
      using(var pen = new Pen(Color.Red, 3.0F))
      {
          e.Graphics.DrawLine(pen, this.MouseInitialPosition, this.MouseLastPosition);
      }
  }
  </code></pre>
  
  <p>But that's giving me not quite I've been waiting for:</p>
  
  <ul>
  <li><p>I can't put several lines. Lines are not stored;</p></li>
  <li><p>I'm overwriting line with line;</p></li>
  </ul>
  
  <p>Second. I need to get all pixels from an image I've been drawing onto and filter them in some way (i.e. extract special ones). How do I store lines/scribbles onto image and then read the image efficiently?</p>