how can I save the contents of a picture box into a jpeg
Printable View
how can I save the contents of a picture box into a jpeg
Use a DLL to do it. http://haztek.d2g.com/files/bmp2jpg.zip
VB Code:
Private Declare Function BmpToJpeg Lib "Bmp2Jpeg.dll" (ByVal BmpFilename As String, ByVal JpegFilename As String, ByVal _ CompressQuality As Integer) As Integer SavePicture Picture1.Picture, "C:\temp.938" BmpToJpeg "C:\temp.938", "C:\thefile.jpg", 100 '100 = quality level Kill "C:\temp.938"
does 100 mean that its in the same condition as the file was when it was opened
I think 100 is the highest quality jpeg you can get. It will make the biggest file size, but will still compress to jpeg. It may have a little bit of loss, but probably barely noticable, if at all.