How can i use getpixel to create new image from a pictureBox.Image and a Bitmap bmp?
<p>Im trying to use Graphics.DrawImage but im getting black image and on it the red points im drawing. Why im getting the black image ?</p>

<p>This is the function:</p>

<pre><code>public Bitmap SaveFromPictureBoxToBitMap(Bitmap image1, Image pbox)
        {

            Graphics g = Graphics.FromImage(image1);
            Point p = new Point(pbox.Width,pbox.Height);
            g.DrawImage(pbox, p);
            image1.Save(@"d:\PictureBoxToBitmap\ptob.bmp", System.Drawing.Imaging.ImageFormat.Bmp);
            return newImage;
        }
</code></pre>

<p>image1 is the bmp variable wich im drawing to in the paint event. And pbox is just pictureBox1.Image and im using this function in the trackBar1 scroll event.</p>

<p>This is what im getting im adding a screenshot here:</p>

<p><img src="http://i.stack.imgur.com/S6fFs.png" alt="enter image description here"></p>

<p>On the background instead black i need to get the image from the pictureBox1 but it dosent work why ?</p>
