예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            //七牛服务端对图片进行处理
            String newDomain = "liuhanlin-work";
             //   String newKey = "xxxxccssss-1.jpg";
            String imageUrl = "http://liuhanlin-work.qiniudn.com/-123456.jpg";
            ImageMogrify target = new ImageMogrify
            {
                Thumbnail = "!50x50r",
                Gravity = "center",
                Rotate = 90,
                Crop = "!50x50",
                Quality = 80,
                AutoOrient = true
            };
            String tmpUrl = target.MakeRequest(imageUrl);

            String tmpDealUrl = QiNiuHelper.GetImageSaveUrl(tmpUrl, newDomain, "buhao12.jpg");

               // CallRet tmpCallRet = QiNiuHelper.Get(tmpDealUrl);

            QiNiuHelper.get(tmpDealUrl);

             // string tmpCallRet = QiNiuHelper.HttpGet(tmpDealUrl);
            int a;
        }
 public void MakeRequestTest()
 {
     ImageMogrify target = new ImageMogrify
     {
         Thumbnail = "!50x50r",
         Gravity = "center",
         Rotate = 90,
         Crop = "!50x50",
         Quality = 80,
         AutoOrient = true
     };
     string mogrUrl = target.MakeRequest(FileOpUrl);
     //System.Diagnostics.Process.Start(mogrUrl);
     PrintLn(mogrUrl);
     Assert.IsTrue(!string.IsNullOrEmpty(mogrUrl), "ImageMogrifyTest MakeRequestTest Failure");
 }