Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > How to convert to GIF or JPEG in VB 6.0


Reply
 
Thread Tools Display Modes
  #1  
Old 08-22-2000, 10:14 AM
emresevinc
Guest
 
Posts: n/a
Question How to convert to GIF or JPEG in VB 6.0


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.

Reply With Quote
  #2  
Old 08-22-2000, 05:41 PM
amram71
Guest
 
Posts: n/a
Default Re: How to convert to GIF or JPEG in VB 6.0

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!
Reply With Quote
  #3  
Old 08-23-2000, 07:24 PM
cwhite40
Guest
 
Posts: n/a
Default Re: How to convert to GIF or JPEG in VB 6.0

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

Reply With Quote
  #4  
Old 02-12-2003, 06:11 AM
Sandro Cella's Avatar
Sandro Cella Sandro Cella is offline
Regular
 
Join Date: Feb 2003
Location: Quebec Canada
Posts: 96
Default Need to concert to JPeg also

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.xtremevbtalk.com/show...threadid=11629

I need to convert about 1500 bitmaps to Jpeg so i am hopping in finding a solution also.
__________________
I love Microsoft products
Sandro Cella
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->