# \[vb.net\] Save Image from Bitmap?

**URL:** <https://forum.kirupa.com/t/vb-net-save-image-from-bitmap/217425>\
**Category:** programming\
**Created:** [February 26, 2007, 9:46pm UTC](https://forum.kirupa.com/t/vb-net-save-image-from-bitmap/217425 "2007-02-26T21:46:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Templarian](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/templarian/32/7152_2.png) [@Templarian](https://forum.kirupa.com/u/Templarian)\
**Post date:** [February 26, 2007, 9:46pm UTC](https://forum.kirupa.com/t/vb-net-save-image-from-bitmap/217425/1 "2007-02-26T21:46:00Z")

</div>

I have found an article describing the problem, but have been unsuccessful in getting it to work. See if an image is opened then saved it seems to think the image is opened (therefore locked), so it can’t be resaved to the same location.

[http://support.microsoft.com/?id=814675](http://support.microsoft.com/?id=814675)

Open:

```auto
Dim dlg As OpenFileDialog = New OpenFileDialog()
dlg.Filter = "Tile files (*.png)|*.png|All files (*.*)|*.*"
Dim res As DialogResult = dlg.ShowDialog()
If res = 1 Then
 workingimage = Image.FromFile(dlg.FileName)
 workingimagesave = dlg.FileName
End If

```

Save:

```auto
workingimage.save(workingimagesave)

```

Thanks.
