Compressing an image using GDI+ losing quality

Nov 16 2005 9:17 AM

Hi  

We are building an Web Site where we implementing the compression Logic provided by GDI + Library for making the Thumbsnail image.

But in the process we are losing the quality of the end compressed image.

I am adding the snip shot of code which we are using..

 

mbmpSave = new Bitmap(mintpxlDestWidth, mintpxlDestHeight);

 

using (Graphics g = Graphics.FromImage(mbmpSave))

{

g.Clear(mclrBackground);

g.DrawImage(mimgOriginal, intLeftX,intLeftY, intTargetWidth, intTargetHeight);

mbmpSave.Save ("E:\\images\\08_Ex\\135.Jpeg"); 

}

 

Can we improve this behavior by using others functions provided in GDI +

Any Quick help would be deeply needed and appreciated….

 

Regards

Haroon