示例#1
0
        public static void TestSmartCrop()
        {
            lw.GraphicUtils.SmartCrop.SmartCrop sc = new lw.GraphicUtils.SmartCrop.SmartCrop();

            DirectoryInfo path = new DirectoryInfo("set2");

            foreach (FileInfo img in path.GetFiles("*.Jpg"))
            {
                sc.Crop(img.FullName, "set2-res/" + img.Name, 512, 512);
            }
        }
示例#2
0
 public static void SmartCrop(string SourceFile, string DestinationFile, int Width, int Height)
 {
     lw.GraphicUtils.SmartCrop.SmartCrop sc = new lw.GraphicUtils.SmartCrop.SmartCrop();
     sc.Crop(SourceFile, DestinationFile, Width, Height);
 }