22using QBox . Auth ;
33using QBox . RS ;
44using QBox . FileOp ;
5+ using QBox . RPC ;
56
67namespace QBox . Demo
78{
@@ -15,7 +16,6 @@ public class Demo
1516 public static string DEMO_DOMAIN ;
1617 public static Client conn ;
1718 public static RSService rs ;
18- public static ImageOp imageOp ;
1919
2020 public static void Main ( )
2121 {
@@ -31,7 +31,6 @@ public static void Main()
3131
3232 conn = new DigestAuthClient ( ) ;
3333 rs = new RSService ( conn , bucketName ) ;
34- imageOp = new ImageOp ( conn ) ;
3534
3635 MkBucket ( ) ;
3736 RSClientPutFile ( ) ;
@@ -195,7 +194,7 @@ public static void MakeDownloadToken()
195194 public static void ImageOps ( )
196195 {
197196 Console . WriteLine ( "\n ===> FileOp.ImageInfo" ) ;
198- ImageInfoRet infoRet = imageOp . ImageInfo ( "http://" + DEMO_DOMAIN + "/" + key ) ;
197+ ImageInfoRet infoRet = ImageOp . ImageInfo ( "http://" + DEMO_DOMAIN + "/" + key ) ;
199198 PrintRet ( infoRet ) ;
200199 if ( infoRet . OK )
201200 {
@@ -210,7 +209,7 @@ public static void ImageOps()
210209 }
211210
212211 Console . WriteLine ( "\n ===> FileOp.ImageExif" ) ;
213- CallRet exifRet = imageOp . ImageExif ( "http://" + DEMO_DOMAIN + "/" + key ) ;
212+ CallRet exifRet = ImageOp . ImageExif ( "http://" + DEMO_DOMAIN + "/" + key ) ;
214213 PrintRet ( exifRet ) ;
215214 if ( ! exifRet . OK )
216215 {
@@ -219,24 +218,24 @@ public static void ImageOps()
219218
220219 Console . WriteLine ( "\n ===> FileOp.ImageViewUrl" ) ;
221220 ImageViewSpec viewSpec = new ImageViewSpec { Mode = 0 , Width = 200 , Height = 200 } ;
222- string viewUrl = imageOp . ImageViewUrl ( "http://" + DEMO_DOMAIN + "/" + key , viewSpec ) ;
221+ string viewUrl = ImageOp . ImageViewUrl ( "http://" + DEMO_DOMAIN + "/" + key , viewSpec ) ;
223222 Console . WriteLine ( "ImageViewUrl 1:" + viewUrl ) ;
224223 viewSpec . Quality = 1 ;
225224 viewSpec . Format = "gif" ;
226- viewUrl = imageOp . ImageViewUrl ( "http://" + DEMO_DOMAIN + "/" + key , viewSpec ) ;
225+ viewUrl = ImageOp . ImageViewUrl ( "http://" + DEMO_DOMAIN + "/" + key , viewSpec ) ;
227226 Console . WriteLine ( "ImageViewUrl 2:" + viewUrl ) ;
228227 viewSpec . Quality = 90 ;
229228 viewSpec . Sharpen = 10 ;
230229 viewSpec . Format = "png" ;
231- viewUrl = imageOp . ImageViewUrl ( "http://" + DEMO_DOMAIN + "/" + key , viewSpec ) ;
230+ viewUrl = ImageOp . ImageViewUrl ( "http://" + DEMO_DOMAIN + "/" + key , viewSpec ) ;
232231 Console . WriteLine ( "ImageViewUrl 3:" + viewUrl ) ;
233232
234233 Console . WriteLine ( "\n ===> FileOp.ImageMogrifyUrl" ) ;
235234 ImageMogrifySpec mogrSpec = new ImageMogrifySpec {
236235 Thumbnail = "!50x50r" , Gravity = "center" , Rotate = 90 ,
237236 Crop = "!50x50" , Quality = 80 , AutoOrient = true
238237 } ;
239- string mogrUrl = imageOp . ImageMogrifyUrl ( "http://" + DEMO_DOMAIN + "/" + key , mogrSpec ) ;
238+ string mogrUrl = ImageOp . ImageMogrifyUrl ( "http://" + DEMO_DOMAIN + "/" + key , mogrSpec ) ;
240239 Console . WriteLine ( "ImageMogrifyUrl:" + mogrUrl ) ;
241240
242241 Console . WriteLine ( "\n ===> Get" ) ;
0 commit comments