Compress image in .NET
问题 How can i compress and image file(*bmp,*jpeg) in C#, I have to display some images as background on my controls, i m using following code to scale my image Bitmap orgBitmap = new Bitmap(_filePath); Bitmap regBitmap = new Bitmap(reqSize.Width, reqSize.Height); using (Graphics gr = Graphics.FromImage(reqBitmap)) { gr.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; gr.DrawImage(bmp, new RectangleF(0, 0, reqSize.Width, reqSize.Height)); } It giving me the required bitmap. My