Connecting Tech Pros Worldwide Forums | Help | Site Map

Saving Altered Bitmap

Carl
Guest
 
Posts: n/a
#1: Jul 17 '05
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



J French
Guest
 
Posts: n/a
#2: Jul 17 '05

re: Saving Altered Bitmap


On Sat, 01 Jan 2005 18:51:20 GMT, "Carl" <dodger@enter.net> wrote:
[color=blue]
> 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[/color]

Set the AutoRedraw property to True
Save the Picbox.Image

eg:

SavePicture Picture1.Image, "C:\TEST.BMP"
Carl
Guest
 
Posts: n/a
#3: Jul 17 '05

re: Saving Altered Bitmap


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" <erewhon@nowhere.uk> wrote in message
news:41d7dcb0.62160076@news.btclick.com...[color=blue]
> On Sat, 01 Jan 2005 18:51:20 GMT, "Carl" <dodger@enter.net> wrote:
>[color=green]
> > In the application I'm writing, I'm modifying a windows bitmap using[/color][/color]
the[color=blue][color=green]
> >circle and line methods. Once the changes have been made, I would like[/color][/color]
to[color=blue][color=green]
> >save the bitmap with the changes. My problem is, after saving the bitmap[/color][/color]
I[color=blue][color=green]
> >find that the changes haven't been saved with the new file. Any help[/color][/color]
with[color=blue][color=green]
> >what I'm doing wrong? -Carl[/color]
>
> Set the AutoRedraw property to True
> Save the Picbox.Image
>
> eg:
>
> SavePicture Picture1.Image, "C:\TEST.BMP"[/color]


Rick Rothstein
Guest
 
Posts: n/a
#4: Jul 17 '05

re: Saving Altered Bitmap


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

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

Carl
Guest
 
Posts: n/a
#5: Jul 17 '05

re: Saving Altered Bitmap


That was it! I knew I was being stupid. I was identifying The picturebox
correctly! Thanks so much!!


"Rick Rothstein" <rickNOSPAMnews@NOSPAMcomcast.net> wrote in message
news:Gs-dnXS_CawCvEXcRVn-jw@comcast.com...[color=blue][color=green]
> > Private Sub mnu_save_Click()
> > CommonDialog1.Filter = "Pictures (*.bmp)|*.bmp"
> > CommonDialog1.ShowSave
> > SavePicture Image, "d:\my documents\vb6\TEST.BMP"
> > End Sub[/color]
>
> 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
>[/color]


Closed Thread


Similar Visual Basic 4 / 5 / 6 bytes