Skip to content

Commit 229e801

Browse files
nic12347franktguo
andauthored
CI-审核新增参数 (#286)
Co-authored-by: franktguo <[email protected]>
1 parent 28ea075 commit 229e801

File tree

2 files changed

+230
-0
lines changed

2 files changed

+230
-0
lines changed

sample/detectImages.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
'secretId' => $secretId,
1414
'secretKey' => $secretKey)));
1515
try {
16+
// 获取图片base64编码
17+
// $localImageFile = '/tmp/test.jpg';
18+
// $img = file_get_contents($localImageFile);
19+
// $imgInfo = getimagesize($localImageFile);
20+
// $imgBase64Content = base64_encode($img);
21+
1622
$result = $cosClient->detectImages(array(
1723
'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket
1824
'Inputs' => array(
@@ -28,6 +34,12 @@
2834
// 'MaxFrames' => 5, // 可选 针对 GIF 动图审核的最大截帧数量,需大于0。
2935
// 'DataId' => 'bbb', // 可选 图片标识,该字段在结果中返回原始内容,长度限制为512字节
3036
),
37+
// array(
38+
// 'Content' => $imgBase64Content, // 图片文件的内容,需要先经过 base64 编码。
39+
//// 'Interval' => 5, // 可选 审核 GIF 时使用 截帧的间隔
40+
//// 'MaxFrames' => 5, // 可选 针对 GIF 动图审核的最大截帧数量,需大于0。
41+
//// 'DataId' => 'bbb', // 可选 图片标识,该字段在结果中返回原始内容,长度限制为512字节
42+
// ),
3143
),
3244
// 'Conf' => array(
3345
// 'BizType' => '', // 可选 定制化策略,不传走默认策略

0 commit comments

Comments
 (0)