I have a image in picturebox. I want to get that image as a Bitmap.
My one line code is:
Bitmap default_image = (Bitmap)pictureBox5.Image.Clone();
But what i am getting is:
default_image value=null;
Can anyone help me.
Bitmap default_image = new Bitmap(pictureBox5.Image);
You are never instantiating a Bitmap
which is why it is null
.