Saving a picture problem

Andy666

Member
Joined
Aug 17, 2005
Messages
8
Programming Experience
Beginner
I am trying to save a image which is in a picture box. The problem is that the saved image has a black background when it should be white.


Dim file_name As String = "C:\test.bmp"
Dim bm As Bitmap = PictureBox1.Image

bm.Save(file_name, System.Drawing.Imaging.ImageFormat.Bmp)


Does anybody know why this is happening????
 
I just tested your code and it works just fine ... the new .bmp has the same white background color. Maybe your original picture is not properly saved (depth of color, file format etc.)

take a look at the attached project below ... note that it was different project and i just changed couple things there so, don't be confused if you find some things that you don't need at this time.

Regards ;)
 

Attachments

  • SaveAsImage.zip
    23.8 KB · Views: 50
I still cannot figure out why it has a black background. I have attached my code if you have got time to have a look, i would appreciate it.

Cheer...
 

Attachments

  • VB Code.zip
    47.6 KB · Views: 44
Back
Top