Public Function SaveAsHighQualityJpegFile() As Boolean Dim loEncoderParameters As System.Drawing.Imaging.EncoderParameters = Nothing Dim loImageCodecInfo As System.Drawing.Imaging.ImageCodecInfo = Nothing ' Set Image codec of JPEG type, the index of JPEG codec is "1" loImageCodecInfo = System.Drawing.Imaging.ImageCodecInfo.GetImageEncoders()(1) ' Set the parameters for defining the quality of the thumbnail... here it is set to 100% loEncoderParameters = New System.Drawing.Imaging.EncoderParameters(1) loEncoderParameters.Param(0) = New System.Drawing.Imaging.EncoderParameter(System.Drawing.Imaging.Encoder.Quality, 100L) oImage.Save(cFilePath, loImageCodecInfo, loEncoderParameters) Return True End Function