PDA

Click to See Complete Forum and Search --> : Saving a image as JPEG


ycsim
Dec 7th, 1999, 06:41 PM
Does anybody know how to save an image from a picture box as a jpeg file,GIF file or some smaller file formats instead of the bitmap files which are large in size????

vb cub
Sep 20th, 2002, 02:54 AM
Private Sub Command1_Click()
SavePicture Picture1, "c:\xxx.jpg"
End Sub
Private Sub Form_Load()
Picture1.Picture = LoadPicture("c:\yyy.gif")
End Sub

moinkhan
Sep 20th, 2002, 03:04 AM
Originally posted by vb cub
Private Sub Command1_Click()
SavePicture Picture1, "c:\xxx.jpg"
End Sub
Private Sub Form_Load()
Picture1.Picture = LoadPicture("c:\yyy.gif")
End Sub
It would only change the extension and icon... but the format would remain same...i.e. bitmap...
I wish it were that simple...:)
You may need the Intel Jpeg Library... it is a dll which provides you the functions which convert BMP to JPG and vice versa..

vb cub
Sep 20th, 2002, 03:10 AM
http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=21298&lngWId=1

Blobby
Sep 20th, 2002, 03:14 AM
Yes, Moinkhan, you are correct. The Intel JPEG library is what you need. If your app is for commercial use you will have to register and pay a licence fee too. Its similar to mp3