// ******************************************************** *********** //
// The following three simple methods are given, and the following two methods are expanded, and it is estimated that
// ******************************************************** *********** //
///
/// narrow the picture
/// summary>
/// Source diagram file name (including path) param>
/// Save as file name after zooming out (including path) param>
/// zoom to the width param>
/// shrink to height param>
Public void SmallPic (String StrildPic, String StrnewPic, Int IntWidth, Int Height)
{
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;
}
}
///
/// Recruit the picture, automatically calculate the height
/// summary>
/// Source diagram file name (including path) param>
/// Save as file name after zooming out (including path) param>
/// zoom to the width param>
Public void SmallPic (String StrildPic, String StrnewPic, INT INTWIDTH)
{
System.drawing.bitmap objPic, ObjnewPic
Try
{
Objpic = new system.drawing.bitmap (stroldpic);
INT INTHEIGHT = (intWidth / objPic.width) * Objpic.height;
ObjnewPic = new system.drawing.bitmap (objPic, intWidth, Intheight);
Objnewpic.save (strnewPic);
}
Catch (Exception Exp) {throw Exp;}
Finally
{
Objpic = null;
ObjneWPic = NULL;
}
}
///
// / Reproduction the picture to automatically calculate the width
/// summary>
/// Source diagram file name (including path) param> /// saved as file name (including path) param>
/// shrink to height param>
Public void SmallPic (String StroldPic, String StrnewPic, Int INTHEIGHT)
{
System.drawing.bitmap objPic, ObjnewPic
Try
{
Objpic = new system.drawing.bitmap (stroldpic);
INT INTWIDTH = (INTHEIGHT / OBJPIC.HEIGHT) * OBJPIC.WIDTH;
ObjnewPic = new system.drawing.bitmap (objPic, intWidth, Intheight);
Objnewpic.save (strnewPic);
}
Catch (Exception Exp) {throw Exp;}
Finally
{
Objpic = null;
ObjneWPic = NULL;
}
}