469,106 Members | 2,254 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,106 developers. It's quick & easy.

Saving Altered Bitmap

In the application I'm writing, I'm modifying a windows bitmap using the
circle and line methods. Once the changes have been made, I would like to
save the bitmap with the changes. My problem is, after saving the bitmap I
find that the changes haven't been saved with the new file. Any help with
what I'm doing wrong? -Carl
Jul 17 '05 #1
4 7363
On Sat, 01 Jan 2005 18:51:20 GMT, "Carl" <do****@enter.net> wrote:
In the application I'm writing, I'm modifying a windows bitmap using the
circle and line methods. Once the changes have been made, I would like to
save the bitmap with the changes. My problem is, after saving the bitmap I
find that the changes haven't been saved with the new file. Any help with
what I'm doing wrong? -Carl


Set the AutoRedraw property to True
Save the Picbox.Image

eg:

SavePicture Picture1.Image, "C:\TEST.BMP"
Jul 17 '05 #2
Thank you for your help, but I've tried this and it doesn't work. I'm
using a picturebox as a canvas on which to draw. I'm loading a blank
bitmap, test.bmp, and then drawing on the picturebox (e.g..
frm_crysalis.picmain.Circle (-0.25, 0), 1). I'm trying to add a save as
routine to save the modified image, Here is the simple test code that I've
written to do this, but it doesn't work (oh yeah, my Autoredraw property is
set to true).

Private Sub mnu_save_Click()
CommonDialog1.Filter = "Pictures (*.bmp)|*.bmp"
CommonDialog1.ShowSave
SavePicture Image, "d:\my documents\vb6\TEST.BMP"
End Sub

Could the problem be that I'm drawing on the picturebox, not the blank
bitmap test.bmp? I've tried not loading the blank bitmap, but then the
image saved is blank as well. This one really has me baffled. Any ideas
will be greatly appreciated.

"J French" <er*****@nowhere.uk> wrote in message
news:41***************@news.btclick.com...
On Sat, 01 Jan 2005 18:51:20 GMT, "Carl" <do****@enter.net> wrote:
In the application I'm writing, I'm modifying a windows bitmap using thecircle and line methods. Once the changes have been made, I would like tosave the bitmap with the changes. My problem is, after saving the bitmap Ifind that the changes haven't been saved with the new file. Any help withwhat I'm doing wrong? -Carl


Set the AutoRedraw property to True
Save the Picbox.Image

eg:

SavePicture Picture1.Image, "C:\TEST.BMP"

Jul 17 '05 #3
> Private Sub mnu_save_Click()
CommonDialog1.Filter = "Pictures (*.bmp)|*.bmp"
CommonDialog1.ShowSave
SavePicture Image, "d:\my documents\vb6\TEST.BMP"
End Sub


Is this the EXACT code you used? If so, the keyword "Image" by itself is
not sufficient; that needs to be

SavePicture picmain.Image, "d:\my documents\vb6\TEST.BMP"

assuming your PictureBox is named "picmain" as indicated elsewhere in
your post.

Rick

Jul 17 '05 #4
That was it! I knew I was being stupid. I was identifying The picturebox
correctly! Thanks so much!!
"Rick Rothstein" <ri************@NOSPAMcomcast.net> wrote in message
news:Gs********************@comcast.com...
Private Sub mnu_save_Click()
CommonDialog1.Filter = "Pictures (*.bmp)|*.bmp"
CommonDialog1.ShowSave
SavePicture Image, "d:\my documents\vb6\TEST.BMP"
End Sub


Is this the EXACT code you used? If so, the keyword "Image" by itself is
not sufficient; that needs to be

SavePicture picmain.Image, "d:\my documents\vb6\TEST.BMP"

assuming your PictureBox is named "picmain" as indicated elsewhere in
your post.

Rick

Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Michael Kennedy [UB] | last post: by
4 posts views Thread by melanieab | last post: by
3 posts views Thread by Mats Boberg | last post: by
reply views Thread by monfu | last post: by
5 posts views Thread by Steve Marshall | last post: by
1 post views Thread by M Keeton | last post: by
12 posts views Thread by tjonsek | last post: by
5 posts views Thread by TheGanjaMan | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.