Use
Graphics.DrawImage[
^]:
public Image Resize(Image i, int w, int h){
Bitmap r = new Bitmap(w, h);
Graphics g = Graphics.FromImage(r);
g.DrawImage(i, 0, 0, w, h);
g.Dispose();
return r;
}
Note that this produces a raster resize, which is probably what you want for a thumbnail. If you want to be clever you'd have to construct a new image of the same type as the one passed in to you. But since you're using a bitmap in your example, it seems reasonable to do that here.