// ******************************************************** *********** //// The following is given three simple methods, and the following two methods are extensions, and it is estimated that sometimes use // ********** ********************************************************* / / ///
System.Drawing.Bitmap objPic, objNewPic; try {objPic = new System.Drawing.Bitmap (strOldPic); objNewPic = new System.Drawing.Bitmap (objPic, intWidth, intHeight); objNewPic.Save (strNewPic);
} CatCH (Exception Exp) {throw Exp;} Finally {ObjPic = NULL; ObjneWPic = NULL;}}
///
System.Drawing.Bitmap objPic, objNewPic; try {objPic = new System.Drawing.Bitmap (strOldPic); int intHeight = Convert.ToInt32 (((intWidth * 1.0) / (objPic.Width * 1.0)) * objPic.Height) ObjnewPic = new system.drawing.bitmap (objPic, intWidth, INTHEIGHT); ObjnewPic.save (strnewpic, objpic.rawformat);
} CatCH (Exception Exp) {throw Exp;} Finally {ObjPic = NULL; ObjneWPic = NULL;}}
/ * ///
} CatCH (Exception Exp) {throw Exp;} Finally {ObjPic = NULL; ObjneWPic = NULL;}}
* /
// ******************************************************** ************ / / / 天 2004-11-5 // QQ: 37878073 (I hope to exchange with everyone)