Skip to content

Commit 0e2d273

Browse files
committed
update doc for fileop
1 parent 704afd7 commit 0e2d273

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

QBox/Docs/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,13 @@ client 参数是能自动为请求在 HTTP Header 中添加 UpToken 的 Client
239239
public int Height { get; private set; }
240240
public string ColorModel { get; private set; }
241241
}
242-
public ImageInfoRet ImageInfo(string url);
242+
public static ImageInfoRet ImageInfo(string url);
243243

244244
例子:
245245

246246
using QBox.FileOp;
247247

248-
ImageInfoRet ret = imageOp.ImageInfo("http://yourbucket.qiniudn.com/" + key);
248+
ImageInfoRet ret = ImageOp.ImageInfo("http://yourbucket.qiniudn.com/" + key);
249249
if (ret.OK)
250250
{
251251
Console.WriteLine("Format: " + ret.Format);
@@ -260,13 +260,14 @@ client 参数是能自动为请求在 HTTP Header 中添加 UpToken 的 Client
260260

261261
获取图片 EXIF 信息,API 为:
262262

263-
public CallRet ImageExif(string url);
263+
public static CallRet ImageExif(string url);
264264

265265
例子:
266266

267267
using QBox.FileOp;
268+
using QBox.RPC;
268269

269-
CallRet ret = imageOp.ImageExif("http://yourbucket.qiniudn.com/" + key);
270+
CallRet ret = ImageOp.ImageExif("http://yourbucket.qiniudn.com/" + key);
270271
if (ret.OK) Console.Writeline("Exif:\n" + ret.Response);
271272

272273
<a name="imageview"></a>
@@ -294,7 +295,7 @@ client 参数是能自动为请求在 HTTP Header 中添加 UpToken 的 Client
294295
using QBox.FileOp;
295296

296297
ImageViewSpec viewSpec = new ImageViewSpec{Mode = 1, Width = 200, Height= 200};
297-
string viewUrl = imageOp.ImageViewUrl("http://yourbucket.qiniudn.com/" + key, viewSpec);
298+
string viewUrl = ImageOp.ImageViewUrl("http://yourbucket.qiniudn.com/" + key, viewSpec);
298299
Console.WriteLine("ImageViewUrl:" + viewUrl);
299300

300301
<a name="imagemogrify"></a>
@@ -325,7 +326,7 @@ client 参数是能自动为请求在 HTTP Header 中添加 UpToken 的 Client
325326
ImageMogrifySpec mogrSpec = new ImageMogrifySpec {
326327
Thumbnail = "!50x50r", Gravity = "center", Rotate = 90,
327328
Crop = "!50x50", Quality = 80, AutoOrient = true};
328-
string mogrUrl = imageOp.ImageMogrifyUrl("http://yourbucket.qiniudn.com/" + key, mogrSpec);
329+
string mogrUrl = ImageOp.ImageMogrifyUrl("http://yourbucket.qiniudn.com/" + key, mogrSpec);
329330
Console.WriteLine("ImageMogrifyUrl:" + mogrUrl);
330331

331332
可以将处理后的图片持久化到云存储,这里需要一个结过授权的图片 URL, 可以用 Get 接口获取的,所需 API 为:

0 commit comments

Comments
 (0)