using System . Drawing . Imaging;
ImageCodecInfo [] vImageCodecInfos = ImageCodecInfo . GetImageEncoders();
Bitmap vBitmap = new Bitmap ( @"c:\temp\temp.bmp" );
foreach ( ImageCodecInfo vImageCodecInfo in vImageCodecInfos)
{
if (vImageCodecInfo . FormatDescription . ToLower() == "jpeg" )
{
EncoderParameters vEncoderParameters = new EncoderParameters ( 1 );
vEncoderParameters . Param[ 0 ] = new EncoderParameter (
System . Drawing . Imaging . Encoder . Quality, 75L );
vBitmap . Save( @"c:\temp\temp.jpg" , vImageCodecInfo, vEncoderParameters);
break ;
}
}