cloudmersive-image-recognition-api-client 1.4.4 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +14 -14
- data/docs/ConvertApi.md +6 -6
- data/docs/EditApi.md +15 -15
- data/docs/FaceApi.md +12 -12
- data/docs/FaceLocateResponse.md +1 -1
- data/docs/FilterApi.md +3 -3
- data/docs/ImageMetadata.md +2 -0
- data/docs/InfoApi.md +3 -3
- data/docs/NsfwApi.md +3 -3
- data/docs/RecognizeApi.md +6 -6
- data/docs/ResizeApi.md +6 -6
- data/lib/cloudmersive-image-recognition-api-client/api/convert_api.rb +5 -5
- data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +15 -15
- data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +8 -8
- data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +2 -2
- data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +2 -2
- data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +2 -2
- data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +4 -4
- data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +6 -6
- data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +14 -13
- data/lib/cloudmersive-image-recognition-api-client/models/image_metadata.rb +21 -1
- data/lib/cloudmersive-image-recognition-api-client/version.rb +1 -1
- data/spec/api/convert_api_spec.rb +1 -1
- data/spec/api/edit_api_spec.rb +5 -5
- data/spec/api/face_api_spec.rb +4 -4
- data/spec/api/filter_api_spec.rb +1 -1
- data/spec/api/info_api_spec.rb +1 -1
- data/spec/api/nsfw_api_spec.rb +1 -1
- data/spec/api/recognize_api_spec.rb +2 -2
- data/spec/api/resize_api_spec.rb +2 -2
- data/spec/models/face_locate_response_spec.rb +4 -4
- data/spec/models/image_metadata_spec.rb +12 -0
- metadata +2 -2
|
@@ -18,6 +18,9 @@ module CloudmersiveImageRecognitionApiClient
|
|
|
18
18
|
# True if the operation was successful, false otherwise
|
|
19
19
|
attr_accessor :successful
|
|
20
20
|
|
|
21
|
+
# True if the input image is a valid image file, false otherwise
|
|
22
|
+
attr_accessor :is_valid_image
|
|
23
|
+
|
|
21
24
|
# File format of the image
|
|
22
25
|
attr_accessor :file_format
|
|
23
26
|
|
|
@@ -30,6 +33,9 @@ module CloudmersiveImageRecognitionApiClient
|
|
|
30
33
|
# Bits per pixel
|
|
31
34
|
attr_accessor :bit_depth
|
|
32
35
|
|
|
36
|
+
# True if the image has transaprency in the form of an alpha channel, false otherwise
|
|
37
|
+
attr_accessor :has_transparency
|
|
38
|
+
|
|
33
39
|
# Color space of the image
|
|
34
40
|
attr_accessor :color_space
|
|
35
41
|
|
|
@@ -44,10 +50,12 @@ module CloudmersiveImageRecognitionApiClient
|
|
|
44
50
|
def self.attribute_map
|
|
45
51
|
{
|
|
46
52
|
:'successful' => :'Successful',
|
|
53
|
+
:'is_valid_image' => :'IsValidImage',
|
|
47
54
|
:'file_format' => :'FileFormat',
|
|
48
55
|
:'width' => :'Width',
|
|
49
56
|
:'height' => :'Height',
|
|
50
57
|
:'bit_depth' => :'BitDepth',
|
|
58
|
+
:'has_transparency' => :'HasTransparency',
|
|
51
59
|
:'color_space' => :'ColorSpace',
|
|
52
60
|
:'exif_profile_name' => :'ExifProfileName',
|
|
53
61
|
:'exif_values' => :'ExifValues'
|
|
@@ -58,10 +66,12 @@ module CloudmersiveImageRecognitionApiClient
|
|
|
58
66
|
def self.swagger_types
|
|
59
67
|
{
|
|
60
68
|
:'successful' => :'BOOLEAN',
|
|
69
|
+
:'is_valid_image' => :'BOOLEAN',
|
|
61
70
|
:'file_format' => :'String',
|
|
62
71
|
:'width' => :'Integer',
|
|
63
72
|
:'height' => :'Integer',
|
|
64
73
|
:'bit_depth' => :'Integer',
|
|
74
|
+
:'has_transparency' => :'BOOLEAN',
|
|
65
75
|
:'color_space' => :'String',
|
|
66
76
|
:'exif_profile_name' => :'String',
|
|
67
77
|
:'exif_values' => :'Array<ImageMetadataExifValue>'
|
|
@@ -80,6 +90,10 @@ module CloudmersiveImageRecognitionApiClient
|
|
|
80
90
|
self.successful = attributes[:'Successful']
|
|
81
91
|
end
|
|
82
92
|
|
|
93
|
+
if attributes.has_key?(:'IsValidImage')
|
|
94
|
+
self.is_valid_image = attributes[:'IsValidImage']
|
|
95
|
+
end
|
|
96
|
+
|
|
83
97
|
if attributes.has_key?(:'FileFormat')
|
|
84
98
|
self.file_format = attributes[:'FileFormat']
|
|
85
99
|
end
|
|
@@ -96,6 +110,10 @@ module CloudmersiveImageRecognitionApiClient
|
|
|
96
110
|
self.bit_depth = attributes[:'BitDepth']
|
|
97
111
|
end
|
|
98
112
|
|
|
113
|
+
if attributes.has_key?(:'HasTransparency')
|
|
114
|
+
self.has_transparency = attributes[:'HasTransparency']
|
|
115
|
+
end
|
|
116
|
+
|
|
99
117
|
if attributes.has_key?(:'ColorSpace')
|
|
100
118
|
self.color_space = attributes[:'ColorSpace']
|
|
101
119
|
end
|
|
@@ -131,10 +149,12 @@ module CloudmersiveImageRecognitionApiClient
|
|
|
131
149
|
return true if self.equal?(o)
|
|
132
150
|
self.class == o.class &&
|
|
133
151
|
successful == o.successful &&
|
|
152
|
+
is_valid_image == o.is_valid_image &&
|
|
134
153
|
file_format == o.file_format &&
|
|
135
154
|
width == o.width &&
|
|
136
155
|
height == o.height &&
|
|
137
156
|
bit_depth == o.bit_depth &&
|
|
157
|
+
has_transparency == o.has_transparency &&
|
|
138
158
|
color_space == o.color_space &&
|
|
139
159
|
exif_profile_name == o.exif_profile_name &&
|
|
140
160
|
exif_values == o.exif_values
|
|
@@ -149,7 +169,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
|
149
169
|
# Calculates hash code according to all attributes.
|
|
150
170
|
# @return [Fixnum] Hash code
|
|
151
171
|
def hash
|
|
152
|
-
[successful, file_format, width, height, bit_depth, color_space, exif_profile_name, exif_values].hash
|
|
172
|
+
[successful, is_valid_image, file_format, width, height, bit_depth, has_transparency, color_space, exif_profile_name, exif_values].hash
|
|
153
173
|
end
|
|
154
174
|
|
|
155
175
|
# Builds the object from hash
|
|
@@ -57,7 +57,7 @@ describe 'ConvertApi' do
|
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
# unit tests for convert_to_jpg
|
|
60
|
-
# Convert input image to JPG
|
|
60
|
+
# Convert input image to JPG, JPEG format
|
|
61
61
|
# Converts the input image into JPEG/JPG format. Customize encoding parameters. Supported input file formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PDF, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV.
|
|
62
62
|
# @param quality Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75
|
|
63
63
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
data/spec/api/edit_api_spec.rb
CHANGED
|
@@ -90,7 +90,7 @@ describe 'EditApi' do
|
|
|
90
90
|
# unit tests for edit_draw_polygon
|
|
91
91
|
# Draw a polygon onto an image
|
|
92
92
|
# Draw one or more polygons, with customized visuals, onto an image
|
|
93
|
-
# @param request
|
|
93
|
+
# @param request Polygon drawing request parameters
|
|
94
94
|
# @param [Hash] opts the optional parameters
|
|
95
95
|
# @return [String]
|
|
96
96
|
describe 'edit_draw_polygon test' do
|
|
@@ -102,7 +102,7 @@ describe 'EditApi' do
|
|
|
102
102
|
# unit tests for edit_draw_rectangle
|
|
103
103
|
# Draw a rectangle onto an image
|
|
104
104
|
# Draw one or more rectangles, with customized visuals, onto an image
|
|
105
|
-
# @param request
|
|
105
|
+
# @param request Draw rectangle parameters
|
|
106
106
|
# @param [Hash] opts the optional parameters
|
|
107
107
|
# @return [String]
|
|
108
108
|
describe 'edit_draw_rectangle test' do
|
|
@@ -114,7 +114,7 @@ describe 'EditApi' do
|
|
|
114
114
|
# unit tests for edit_draw_text
|
|
115
115
|
# Draw text onto an image
|
|
116
116
|
# Draw one or more pieces of text, with customized visuals, onto an image
|
|
117
|
-
# @param request
|
|
117
|
+
# @param request Draw text parameters
|
|
118
118
|
# @param [Hash] opts the optional parameters
|
|
119
119
|
# @return [String]
|
|
120
120
|
describe 'edit_draw_text test' do
|
|
@@ -126,8 +126,8 @@ describe 'EditApi' do
|
|
|
126
126
|
# unit tests for edit_drop_shadow
|
|
127
127
|
# Add a customizeable drop shadow to an image
|
|
128
128
|
# Add a customizeable drop shadow to the image
|
|
129
|
-
# @param x
|
|
130
|
-
# @param y
|
|
129
|
+
# @param x Horizontal (X) offset of the drop shadow
|
|
130
|
+
# @param y Vertical (Y) offset of the drop shadow
|
|
131
131
|
# @param sigma Sigma (blur distance) of the drop shadow
|
|
132
132
|
# @param opacity Opacity of the drop shadow; 0 is 0% and 100 is 100%
|
|
133
133
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
data/spec/api/face_api_spec.rb
CHANGED
|
@@ -46,7 +46,7 @@ describe 'FaceApi' do
|
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
# unit tests for face_crop_first
|
|
49
|
-
# Crop image to face
|
|
49
|
+
# Crop image to face with square crop
|
|
50
50
|
# Crop an image to the face (rectangular crop). If there is more than one face present, choose the first one.
|
|
51
51
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
52
52
|
# @param [Hash] opts the optional parameters
|
|
@@ -58,7 +58,7 @@ describe 'FaceApi' do
|
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
# unit tests for face_crop_first_round
|
|
61
|
-
# Crop image to face
|
|
61
|
+
# Crop image to face with round crop
|
|
62
62
|
# Crop an image to the face (circular/round crop). If there is more than one face present, choose the first one.
|
|
63
63
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
64
64
|
# @param [Hash] opts the optional parameters
|
|
@@ -94,7 +94,7 @@ describe 'FaceApi' do
|
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
# unit tests for face_locate
|
|
97
|
-
#
|
|
97
|
+
# Detect and find faces in an image
|
|
98
98
|
# Locate the positions of all faces in an image
|
|
99
99
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
100
100
|
# @param [Hash] opts the optional parameters
|
|
@@ -106,7 +106,7 @@ describe 'FaceApi' do
|
|
|
106
106
|
end
|
|
107
107
|
|
|
108
108
|
# unit tests for face_locate_with_landmarks
|
|
109
|
-
#
|
|
109
|
+
# Detect and find faces and landmarks eyes and nose and mouth in image
|
|
110
110
|
# Locate the positions of all faces in an image, along with the eyes, eye brows, nose and mouth components of each
|
|
111
111
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
112
112
|
# @param [Hash] opts the optional parameters
|
data/spec/api/filter_api_spec.rb
CHANGED
|
@@ -45,7 +45,7 @@ describe 'FilterApi' do
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
# unit tests for filter_despeckle
|
|
48
|
-
# Despeckle
|
|
48
|
+
# Despeckle to remove point noise from the image
|
|
49
49
|
# Remove point noise / despeckle the input image
|
|
50
50
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
51
51
|
# @param [Hash] opts the optional parameters
|
data/spec/api/info_api_spec.rb
CHANGED
|
@@ -45,7 +45,7 @@ describe 'InfoApi' do
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
# unit tests for info_get_metadata
|
|
48
|
-
# Returns the image metadata
|
|
48
|
+
# Returns the image metadata including EXIF and resolution
|
|
49
49
|
# Returns the metadata information on the image, including file type, EXIF (if available), and resolution.
|
|
50
50
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
51
51
|
# @param [Hash] opts the optional parameters
|
data/spec/api/nsfw_api_spec.rb
CHANGED
|
@@ -33,7 +33,7 @@ describe 'NsfwApi' do
|
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
# unit tests for nsfw_classify
|
|
36
|
-
# Not safe for work
|
|
36
|
+
# Not safe for work NSFW racy content classification
|
|
37
37
|
# Classify an image into Not Safe For Work (NSFW)/Porn/Racy content and Safe Content.
|
|
38
38
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
@@ -58,7 +58,7 @@ describe 'RecognizeApi' do
|
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
# unit tests for recognize_detect_objects
|
|
61
|
-
# Detect objects
|
|
61
|
+
# Detect objects including types and locations in an image
|
|
62
62
|
# Identify the position, size and description of objects in an image, along with a recognition confidence level. Detects both human people and objects in an image.
|
|
63
63
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
64
64
|
# @param [Hash] opts the optional parameters
|
|
@@ -70,7 +70,7 @@ describe 'RecognizeApi' do
|
|
|
70
70
|
end
|
|
71
71
|
|
|
72
72
|
# unit tests for recognize_detect_people
|
|
73
|
-
# Detect people
|
|
73
|
+
# Detect people including locations in an image
|
|
74
74
|
# Identify the position, and size of human people in an image, along with a recognition confidence level. People in the image do NOT need to be facing the camera; they can be facing away, edge-on, etc.
|
|
75
75
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
76
76
|
# @param [Hash] opts the optional parameters
|
data/spec/api/resize_api_spec.rb
CHANGED
|
@@ -49,8 +49,8 @@ describe 'ResizeApi' do
|
|
|
49
49
|
# unit tests for resize_resize_simple
|
|
50
50
|
# Resize an image
|
|
51
51
|
# Resize an image to a specific width and specific height
|
|
52
|
-
# @param width
|
|
53
|
-
# @param height
|
|
52
|
+
# @param width Width of the output image - final image will be exactly this width
|
|
53
|
+
# @param height Height of the output image - final image will be exactly this height
|
|
54
54
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
55
55
|
# @param [Hash] opts the optional parameters
|
|
56
56
|
# @return [String]
|
|
@@ -32,25 +32,25 @@ describe 'FaceLocateResponse' do
|
|
|
32
32
|
expect(@instance).to be_instance_of(CloudmersiveImageRecognitionApiClient::FaceLocateResponse)
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
|
-
describe 'test attribute "
|
|
35
|
+
describe 'test attribute "successful"' do
|
|
36
36
|
it 'should work' do
|
|
37
37
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
-
describe 'test attribute "
|
|
41
|
+
describe 'test attribute "faces"' do
|
|
42
42
|
it 'should work' do
|
|
43
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
-
describe 'test attribute "
|
|
47
|
+
describe 'test attribute "face_count"' do
|
|
48
48
|
it 'should work' do
|
|
49
49
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
50
50
|
end
|
|
51
51
|
end
|
|
52
52
|
|
|
53
|
-
describe 'test attribute "
|
|
53
|
+
describe 'test attribute "error_details"' do
|
|
54
54
|
it 'should work' do
|
|
55
55
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
56
56
|
end
|
|
@@ -38,6 +38,12 @@ describe 'ImageMetadata' do
|
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
+
describe 'test attribute "is_valid_image"' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
41
47
|
describe 'test attribute "file_format"' do
|
|
42
48
|
it 'should work' do
|
|
43
49
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
@@ -62,6 +68,12 @@ describe 'ImageMetadata' do
|
|
|
62
68
|
end
|
|
63
69
|
end
|
|
64
70
|
|
|
71
|
+
describe 'test attribute "has_transparency"' do
|
|
72
|
+
it 'should work' do
|
|
73
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
65
77
|
describe 'test attribute "color_space"' do
|
|
66
78
|
it 'should work' do
|
|
67
79
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cloudmersive-image-recognition-api-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.4.
|
|
4
|
+
version: 1.4.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Cloudmersive
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-12-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|