Skip to content

Commit 366e300

Browse files
author
karisli
committed
- 支持图片标签识别/-支持
1 parent 22010d0 commit 366e300

29 files changed

+675
-46
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 5.8.7
2+
- 支持图片标签识别、盲水印相关接口
3+
- 支持断点下载,修复高级下载接口无法取消的问题
4+
15
# 5.8.6
26
一、 新增数据万象接口:
37
1. 上传时、下载时二维码识别

Podfile.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
PODS:
2-
- QCloudCore (5.8.3):
3-
- QCloudCore/Default (= 5.8.3)
4-
- QCloudCore/Default (5.8.3)
5-
- QCloudCOSXML (5.8.3):
6-
- QCloudCOSXML/Default (= 5.8.3)
7-
- QCloudCOSXML/Default (5.8.3):
8-
- QCloudCore (= 5.8.3)
2+
- QCloudCore (5.8.6):
3+
- QCloudCore/Default (= 5.8.6)
4+
- QCloudCore/Default (5.8.6)
5+
- QCloudCOSXML (5.8.6):
6+
- QCloudCOSXML/Default (= 5.8.6)
7+
- QCloudCOSXML/Default (5.8.6):
8+
- QCloudCore (= 5.8.6)
99

1010
DEPENDENCIES:
1111
- QCloudCore (from `.`)
@@ -18,9 +18,9 @@ EXTERNAL SOURCES:
1818
:path: "."
1919

2020
SPEC CHECKSUMS:
21-
QCloudCore: b490b9a2f5f79dbdd681d44ef3403a918a6ecd31
22-
QCloudCOSXML: 8aaae9b91e9b2d92a8dd0c2479c77d8ef6f30f31
21+
QCloudCore: bb327d2ad5f2d6b47e35ca73e50206557efd5a60
22+
QCloudCOSXML: 4294d95d48f90ca45999b71e2a71a7a63ebcf803
2323

2424
PODFILE CHECKSUM: 384b99448c6c2fa2f931b43a3eacbd13f1ec5751
2525

26-
COCOAPODS: 1.9.3
26+
COCOAPODS: 1.10.1

QCloudCOSXML.podspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = "QCloudCOSXML"
33

4-
s.version = "5.8.6"
4+
s.version = "5.8.7"
55

66
s.summary = "QCloudCOSXML 腾讯云iOS-SDK组件"
77

@@ -20,15 +20,15 @@ s.version = "5.8.6"
2020
s.subspec 'Default' do |default|
2121
default.source_files = 'QCloudCOSXML/Classes/**/*','Models/request.model','QCloudCOSXML/Classes/QCloudCOSXML/*'
2222

23-
default.dependency "QCloudCore",'5.8.6'
23+
default.dependency "QCloudCore",'5.8.7'
2424
end
2525
s.subspec 'Slim' do |slim|
2626
slim.source_files = 'QCloudCOSXML/Classes/**/*','Models/request.model','QCloudCOSXML/Classes/QCloudCOSXML/*'
27-
slim.dependency "QCloudCore/WithoutMTA",'5.8.6'
27+
slim.dependency "QCloudCore/WithoutMTA",'5.8.7'
2828
end
2929
s.subspec 'Transfer' do |transfer|
3030
transfer.source_files = 'QCloudCOSXML/Classes/*','QCloudCOSXML/Classes/Transfer/**/*','QCloudCOSXML/Classes/Base/**/*'
31-
transfer.dependency "QCloudCore/WithoutMTA",'5.8.6'
31+
transfer.dependency "QCloudCore/WithoutMTA",'5.8.7'
3232
end
3333

3434
end

QCloudCOSXML/Classes/Base/QCloudPicOperations.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ typedef NS_ENUM(NSUInteger, QCloudPicOperationRuleEnum) {
1616
QCloudPicOperationRuleText, /// 可直接将文字信息添加至图片中 使用场景:终端信息添加
1717
};
1818

19+
typedef NS_ENUM(NSUInteger, QCloudPicOperationRuleActionEnum) {
20+
QCloudPicOperationRuleActionPut = 3, /// 添加盲水印
21+
QCloudPicOperationRuleActionExtrac = 4, /// 提取盲水印
22+
};
23+
24+
1925
/**
2026
图片添加盲水印接口 参数类
2127
包含水印规则,水印类型,水印参数
@@ -47,6 +53,10 @@ typedef NS_ENUM(NSUInteger, QCloudPicOperationRuleEnum) {
4753
/// 盲水印类型,有效值:1 半盲;2 全盲;3 文字
4854
@property (nonatomic, assign) QCloudPicOperationRuleEnum type;
4955

56+
/// 水印操作:提取水印:4,添加水印:3
57+
@property (nonatomic, assign) QCloudPicOperationRuleActionEnum actionType;
58+
/// 盲水印类型,有效值:1 半盲;2 全盲;3 文字
59+
5060
/**
5161
盲水印图片地址,需要经过 URL 安全的 Base64 编码。 当 type 为1或2时必填,type 为3时无效。
5262
指定的水印图片必须同时满足如下 3 个条件:

QCloudCOSXML/Classes/Base/QCloudPicOperations.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ - (NSString *)rule {
5656
QCloudLogError(@"水印类型错误");
5757
return nil;
5858
}
59-
60-
NSMutableString *strRule = [NSMutableString stringWithString:@"watermark/3/type"];
59+
60+
NSMutableString *strRule = [NSMutableString stringWithFormat:@"%@", [NSString stringWithFormat:@"watermark/%lu/type",(unsigned long)self.actionType]];
6161

6262
[strRule appendFormat:@"/%ld", _type];
6363

QCloudCOSXML/Classes/QCloudCOSXML/QCloudCOSXML.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
#import "QCloudCopyObjectResult.h"
8989
#import "QCloudPutObjectCopyRequest.h"
9090
//数据万象
91+
#import "QCloudCIPicRecognitionRequest.h"
9192
#import "QCloudQRCodeRecognitionRequest.h"
9293
#import "QCloudCICloudDataOperationsRequest.h"
9394
#import "QCloudCIPutObjectQRCodeRecognitionRequest.h"

QCloudCOSXML/Classes/QCloudCOSXMLVersion.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
#ifndef QCloudCOSXMLModuleVersion_h
77
#define QCloudCOSXMLModuleVersion_h
8-
#define QCloudCOSXMLModuleVersionNumber 508006
8+
#define QCloudCOSXMLModuleVersionNumber 508007
99

1010
//dependency
1111

1212
//
1313
FOUNDATION_EXTERN NSString * const QCloudCOSXMLModuleVersion;
1414
FOUNDATION_EXTERN NSString * const QCloudCOSXMLModuleName;
1515

16-
#endif
16+
#endif

QCloudCOSXML/Classes/QCloudCOSXMLVersion.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#import "QCloudCOSXMLVersion.h"
2-
NSString * const QCloudCOSXMLModuleVersion = @"5.8.6";
2+
NSString * const QCloudCOSXMLModuleVersion = @"5.8.7";
3+
34
NSString * const QCloudCOSXMLModuleName = @"QCloudCOSXML";
45
@interface QCloudQCloudCOSXMLLoad : NSObject
56
@end
@@ -26,4 +27,4 @@ + (void) load
2627
#pragma clang diagnostic pop
2728
}
2829
}
29-
@end
30+
@end
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
//
2+
// QCloudCIPicLabelsInfo.h
3+
// QCloudCIPicLabelsInfo
4+
//
5+
// Created by tencent
6+
// Copyright (c) 2015年 tencent. All rights reserved.
7+
//
8+
// ██████╗ ██████╗██╗ ██████╗ ██╗ ██╗██████╗ ████████╗███████╗██████╗ ███╗ ███╗██╗███╗ ██╗ █████╗ ██╗ ██╗ █████╗ ██████╗
9+
// ██╔═══██╗██╔════╝██║ ██╔═══██╗██║ ██║██╔══██╗ ╚══██╔══╝██╔════╝██╔══██╗████╗ ████║██║████╗ ██║██╔══██╗██║ ██║ ██╔══██╗██╔══██╗
10+
// ██║ ██║██║ ██║ ██║ ██║██║ ██║██║ ██║ ██║ █████╗ ██████╔╝██╔████╔██║██║██╔██╗ ██║███████║██║ ██║ ███████║██████╔╝
11+
// ██║▄▄ ██║██║ ██║ ██║ ██║██║ ██║██║ ██║ ██║ ██╔══╝ ██╔══██╗██║╚██╔╝██║██║██║╚██╗██║██╔══██║██║ ██║ ██╔══██║██╔══██╗
12+
// ╚██████╔╝╚██████╗███████╗╚██████╔╝╚██████╔╝██████╔╝ ██║ ███████╗██║ ██║██║ ╚═╝ ██║██║██║ ╚████║██║ ██║███████╗ ███████╗██║ ██║██████╔╝
13+
// ╚══▀▀═╝ ╚═════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝╚══════╝ ╚══════╝╚═╝ ╚═╝╚═════╝
14+
//
15+
//
16+
// _ __ _ _
17+
// (_) / _| | | | |
18+
// ___ ___ _ ____ ___ ___ ___ | |_ ___ _ __ __| | _____ _____| | ___ _ __ ___ _ __ ___
19+
// / __|/ _ \ '__\ \ / / |/ __/ _ \ | _/ _ \| '__| / _` |/ _ \ \ / / _ \ |/ _ \| '_ \ / _ \ '__/ __|
20+
// \__ \ __/ | \ V /| | (_| __/ | || (_) | | | (_| | __/\ V / __/ | (_) | |_) | __/ | \__
21+
// |___/\___|_| \_/ |_|\___\___| |_| \___/|_| \__,_|\___| \_/ \___|_|\___/| .__/ \___|_| |___/
22+
// ______ ______ ______ ______ ______ ______ ______ ______ | |
23+
// |______|______|______|______|______|______|______|______| |_|
24+
//
25+
26+
27+
28+
#import <Foundation/Foundation.h>
29+
#import <QCloudCore/QCloudCore.h>
30+
31+
NS_ASSUME_NONNULL_BEGIN
32+
@interface QCloudCIPicLabelsInfo : NSObject
33+
/**
34+
该标签的置信度分数,分数越高则该标签准确度越高
35+
*/
36+
@property (strong, nonatomic) NSString *confidence;
37+
/**
38+
识别出的图片标签
39+
*/
40+
@property (strong, nonatomic) NSString *name;
41+
@end
42+
NS_ASSUME_NONNULL_END
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
//
2+
// QCloudCIPicLabelsInfo.m
3+
// QCloudCIPicLabelsInfo
4+
//
5+
// Created by tencent
6+
// Copyright (c) 2015年 tencent. All rights reserved.
7+
//
8+
// ██████╗ ██████╗██╗ ██████╗ ██╗ ██╗██████╗ ████████╗███████╗██████╗ ███╗ ███╗██╗███╗ ██╗ █████╗ ██╗ ██╗ █████╗ ██████╗
9+
// ██╔═══██╗██╔════╝██║ ██╔═══██╗██║ ██║██╔══██╗ ╚══██╔══╝██╔════╝██╔══██╗████╗ ████║██║████╗ ██║██╔══██╗██║ ██║ ██╔══██╗██╔══██╗
10+
// ██║ ██║██║ ██║ ██║ ██║██║ ██║██║ ██║ ██║ █████╗ ██████╔╝██╔████╔██║██║██╔██╗ ██║███████║██║ ██║ ███████║██████╔╝
11+
// ██║▄▄ ██║██║ ██║ ██║ ██║██║ ██║██║ ██║ ██║ ██╔══╝ ██╔══██╗██║╚██╔╝██║██║██║╚██╗██║██╔══██║██║ ██║ ██╔══██║██╔══██╗
12+
// ╚██████╔╝╚██████╗███████╗╚██████╔╝╚██████╔╝██████╔╝ ██║ ███████╗██║ ██║██║ ╚═╝ ██║██║██║ ╚████║██║ ██║███████╗ ███████╗██║ ██║██████╔╝
13+
// ╚══▀▀═╝ ╚═════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝╚══════╝ ╚══════╝╚═╝ ╚═╝╚═════╝
14+
//
15+
//
16+
// _ __ _ _
17+
// (_) / _| | | | |
18+
// ___ ___ _ ____ ___ ___ ___ | |_ ___ _ __ __| | _____ _____| | ___ _ __ ___ _ __ ___
19+
// / __|/ _ \ '__\ \ / / |/ __/ _ \ | _/ _ \| '__| / _` |/ _ \ \ / / _ \ |/ _ \| '_ \ / _ \ '__/ __|
20+
// \__ \ __/ | \ V /| | (_| __/ | || (_) | | | (_| | __/\ V / __/ | (_) | |_) | __/ | \__
21+
// |___/\___|_| \_/ |_|\___\___| |_| \___/|_| \__,_|\___| \_/ \___|_|\___/| .__/ \___|_| |___/
22+
// ______ ______ ______ ______ ______ ______ ______ ______ | |
23+
// |______|______|______|______|______|______|______|______| |_|
24+
//
25+
26+
27+
#import "QCloudCIPicLabelsInfo.h"
28+
29+
30+
31+
NS_ASSUME_NONNULL_BEGIN
32+
@implementation QCloudCIPicLabelsInfo
33+
34+
35+
36+
+ (NSDictionary *)modelCustomPropertyMapper
37+
{
38+
return @{
39+
@"confidence" :@"Confidence",
40+
@"name" :@"Name",
41+
};
42+
}
43+
44+
45+
- (BOOL)modelCustomTransformToDictionary:(NSMutableDictionary *)dic
46+
{
47+
48+
49+
return YES;
50+
}
51+
52+
- (NSDictionary *)modelCustomWillTransformFromDictionary:(NSDictionary *)dic
53+
{
54+
if (!dic) {
55+
return dic;
56+
}
57+
NSMutableDictionary* transfromDic = [NSMutableDictionary dictionaryWithDictionary:dic];
58+
59+
return transfromDic;
60+
}
61+
62+
@end
63+
64+
65+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)