emresevinc
08-22-2000, 10:14 AM
Hi,
I want to convert my drawings to GIF or JPEG on the fly.
I mean, assuming that I draw on a form or a pciture box using methods like Line, Circle, etc. is there a way in Visual Basic 6.0 to save the image I created in GIF or JPG format so that I don't have to run the program all the time for the same graphic?
Any help appreciated.
Thanks in advance.
amram71
08-22-2000, 05:41 PM
You cna use the SavePicture [Picture], [Filename] statement to save it as a bitmap... I dont know how to do it as a GIF or JiggaPEG {hehe}...
If you do figure out, i would like to know
Good Luck!
cwhite40
08-23-2000, 07:24 PM
Try using the Common Dialog Box control with the gif and jpeg extensions in the file filter like this..
CommonDialog.Filter = Gif (*.gif)|*.gif|Jpeg (*.jpg)|*.jpg
Then save the picture box like so
CommonDialog.ShowSave
If CommonDialog.FileName = "" Then
MsgBox("Please enter a filename")
Else
SavePicture(PictureBox.Image, CommonDialog.filename)
or
SavePicture(PictureBox.Image, "File.jpg" (or "File.gif")
End If
The first parameter must be the Image property of the picture box / image control. I tried the picture property but that doesn't work.
Hope this helps
Sandro Cella
02-12-2003, 06:11 AM
From my understanding, VB cant convert Bitmap to Jpeg ou Gif without a Third party control.
There is a nice Walkthought but unfortunataly, its out of date
http://www.visualbasicforum.com/showthread.php?s=&threadid=11629
I need to convert about 1500 bitmaps to Jpeg so i am hopping in finding a solution also.