cloudmersive-image-recognition-api-client 1.4.6 → 2.0.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/Gemfile +1 -1
- data/README.md +17 -6
- data/cloudmersive-image-recognition-api-client.gemspec +3 -3
- data/docs/ArtisticApi.md +2 -2
- data/docs/ConvertApi.md +7 -7
- data/docs/CreateHandwritingRequest.md +11 -0
- data/docs/DrawTextInstance.md +1 -1
- data/docs/EditApi.md +147 -11
- data/docs/FaceApi.md +8 -8
- data/docs/FilterApi.md +8 -8
- data/docs/ImageSimilarityComparisonResponse.md +10 -0
- data/docs/ImageSimilarityHashDistanceRequest.md +9 -0
- data/docs/ImageSimilarityHashDistanceResponse.md +9 -0
- data/docs/ImageSimilarityHashResponse.md +9 -0
- data/docs/InfoApi.md +2 -2
- data/docs/NsfwApi.md +1 -1
- data/docs/RecognizeApi.md +187 -11
- data/docs/ResizeApi.md +4 -4
- data/docs/TextGenerationApi.md +63 -0
- data/lib/cloudmersive-image-recognition-api-client.rb +7 -1
- data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +6 -7
- data/lib/cloudmersive-image-recognition-api-client/api/convert_api.rb +30 -37
- data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +199 -58
- data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +31 -38
- data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +34 -42
- data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +10 -12
- data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +6 -7
- data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +214 -45
- data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +14 -16
- data/lib/cloudmersive-image-recognition-api-client/api/text_generation_api.rb +77 -0
- data/lib/cloudmersive-image-recognition-api-client/api_client.rb +11 -9
- data/lib/cloudmersive-image-recognition-api-client/api_error.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/configuration.rb +2 -2
- data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/color_result.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/create_handwriting_request.rb +216 -0
- data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/detected_object.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/dominant_color_result.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_instance.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_request.rb +9 -13
- data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +9 -13
- data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +8 -11
- data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +9 -13
- data/lib/cloudmersive-image-recognition-api-client/models/face.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/face_compare_response.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/face_match.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/face_point.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/face_with_landmarks.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/find_symbol_result.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/fine_text_detection_result.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/fine_text_item.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/gender_detection_result.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/image_metadata.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/image_metadata_exif_value.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/image_similarity_comparison_response.rb +206 -0
- data/lib/cloudmersive-image-recognition-api-client/models/image_similarity_hash_distance_request.rb +196 -0
- data/lib/cloudmersive-image-recognition-api-client/models/image_similarity_hash_distance_response.rb +196 -0
- data/lib/cloudmersive-image-recognition-api-client/models/image_similarity_hash_response.rb +196 -0
- data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/object_detection_result.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/person_with_gender.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/polygon_point.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/text_detection_result.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/text_item.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/version.rb +2 -2
- data/spec/api/artistic_api_spec.rb +2 -2
- data/spec/api/convert_api_spec.rb +8 -8
- data/spec/api/edit_api_spec.rb +47 -13
- data/spec/api/face_api_spec.rb +8 -8
- data/spec/api/filter_api_spec.rb +9 -9
- data/spec/api/info_api_spec.rb +3 -3
- data/spec/api/nsfw_api_spec.rb +2 -2
- data/spec/api/recognize_api_spec.rb +49 -10
- data/spec/api/resize_api_spec.rb +5 -5
- data/spec/api/text_generation_api_spec.rb +47 -0
- data/spec/api_client_spec.rb +52 -35
- data/spec/configuration_spec.rb +9 -9
- data/spec/models/age_detection_result_spec.rb +4 -5
- data/spec/models/color_result_spec.rb +4 -5
- data/spec/models/create_handwriting_request_spec.rb +59 -0
- data/spec/models/detected_license_plate_spec.rb +8 -9
- data/spec/models/detected_object_spec.rb +7 -8
- data/spec/models/dominant_color_result_spec.rb +3 -4
- data/spec/models/draw_polygon_instance_spec.rb +5 -6
- data/spec/models/draw_polygon_request_spec.rb +4 -5
- data/spec/models/draw_rectangle_instance_spec.rb +8 -9
- data/spec/models/draw_rectangle_request_spec.rb +4 -5
- data/spec/models/draw_text_instance_spec.rb +9 -10
- data/spec/models/draw_text_request_spec.rb +4 -5
- data/spec/models/face_compare_response_spec.rb +5 -6
- data/spec/models/face_locate_response_spec.rb +5 -6
- data/spec/models/face_locate_with_landmarks_response_spec.rb +5 -6
- data/spec/models/face_match_spec.rb +7 -8
- data/spec/models/face_point_spec.rb +3 -4
- data/spec/models/face_spec.rb +5 -6
- data/spec/models/face_with_landmarks_spec.rb +14 -15
- data/spec/models/find_symbol_result_spec.rb +7 -8
- data/spec/models/fine_text_detection_result_spec.rb +4 -5
- data/spec/models/fine_text_item_spec.rb +12 -13
- data/spec/models/gender_detection_result_spec.rb +4 -5
- data/spec/models/image_description_response_spec.rb +5 -6
- data/spec/models/image_metadata_exif_value_spec.rb +4 -5
- data/spec/models/image_metadata_spec.rb +11 -12
- data/spec/models/image_similarity_comparison_response_spec.rb +53 -0
- data/spec/models/image_similarity_hash_distance_request_spec.rb +47 -0
- data/spec/models/image_similarity_hash_distance_response_spec.rb +47 -0
- data/spec/models/image_similarity_hash_response_spec.rb +47 -0
- data/spec/models/nsfw_result_spec.rb +4 -5
- data/spec/models/object_detection_result_spec.rb +4 -5
- data/spec/models/person_with_age_spec.rb +5 -6
- data/spec/models/person_with_gender_spec.rb +4 -5
- data/spec/models/polygon_point_spec.rb +3 -4
- data/spec/models/recognition_outcome_spec.rb +3 -4
- data/spec/models/text_detection_result_spec.rb +4 -5
- data/spec/models/text_item_spec.rb +5 -6
- data/spec/models/vehicle_license_plate_detection_result_spec.rb +4 -5
- data/spec/spec_helper.rb +1 -1
- metadata +20 -2
@@ -6,11 +6,11 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
|
-
require
|
13
|
+
require 'uri'
|
14
14
|
|
15
15
|
module CloudmersiveImageRecognitionApiClient
|
16
16
|
class EditApi
|
@@ -19,7 +19,6 @@ module CloudmersiveImageRecognitionApiClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
|
23
22
|
# Normalizes image rotation and removes EXIF rotation data
|
24
23
|
# Automatically orients the input image based on EXIF information and then removes the EXIF information. EXIF is an additional set of information stored in some images taken with cell phone cameras based on the orientation of the camera. By normalizing rotation and removing EXIF data these images become much easier to process.
|
25
24
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
@@ -27,7 +26,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
27
26
|
# @return [String]
|
28
27
|
def edit_auto_orient(image_file, opts = {})
|
29
28
|
data, _status_code, _headers = edit_auto_orient_with_http_info(image_file, opts)
|
30
|
-
|
29
|
+
data
|
31
30
|
end
|
32
31
|
|
33
32
|
# Normalizes image rotation and removes EXIF rotation data
|
@@ -37,14 +36,14 @@ module CloudmersiveImageRecognitionApiClient
|
|
37
36
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
38
37
|
def edit_auto_orient_with_http_info(image_file, opts = {})
|
39
38
|
if @api_client.config.debugging
|
40
|
-
@api_client.config.logger.debug
|
39
|
+
@api_client.config.logger.debug 'Calling API: EditApi.edit_auto_orient ...'
|
41
40
|
end
|
42
41
|
# verify the required parameter 'image_file' is set
|
43
42
|
if @api_client.config.client_side_validation && image_file.nil?
|
44
43
|
fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_auto_orient"
|
45
44
|
end
|
46
45
|
# resource path
|
47
|
-
local_var_path =
|
46
|
+
local_var_path = '/image/edit/auto-orient/remove-exif'
|
48
47
|
|
49
48
|
# query parameters
|
50
49
|
query_params = {}
|
@@ -58,7 +57,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
58
57
|
|
59
58
|
# form parameters
|
60
59
|
form_params = {}
|
61
|
-
form_params[
|
60
|
+
form_params['imageFile'] = image_file
|
62
61
|
|
63
62
|
# http body (model)
|
64
63
|
post_body = nil
|
@@ -75,7 +74,6 @@ module CloudmersiveImageRecognitionApiClient
|
|
75
74
|
end
|
76
75
|
return data, status_code, headers
|
77
76
|
end
|
78
|
-
|
79
77
|
# Composite two images together
|
80
78
|
# Composites two input images together; a layered image onto a base image. The first image you input is the base image. The second image (the layered image) will be composited on top of this base image. Supports PNG transparency. To control padding you can include transparent pixels at the border(s) of your layered images as appropriate.
|
81
79
|
# @param location Location to composite the layered images; possible values are: \"center\", \"top-left\", \"top-center\", \"top-right\", \"center-left\", \"center-right\", \"bottom-left\", \"bottom-center\", \"bottom-right\"
|
@@ -85,7 +83,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
85
83
|
# @return [String]
|
86
84
|
def edit_composite_basic(location, base_image, layered_image, opts = {})
|
87
85
|
data, _status_code, _headers = edit_composite_basic_with_http_info(location, base_image, layered_image, opts)
|
88
|
-
|
86
|
+
data
|
89
87
|
end
|
90
88
|
|
91
89
|
# Composite two images together
|
@@ -97,7 +95,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
97
95
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
98
96
|
def edit_composite_basic_with_http_info(location, base_image, layered_image, opts = {})
|
99
97
|
if @api_client.config.debugging
|
100
|
-
@api_client.config.logger.debug
|
98
|
+
@api_client.config.logger.debug 'Calling API: EditApi.edit_composite_basic ...'
|
101
99
|
end
|
102
100
|
# verify the required parameter 'location' is set
|
103
101
|
if @api_client.config.client_side_validation && location.nil?
|
@@ -112,7 +110,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
112
110
|
fail ArgumentError, "Missing the required parameter 'layered_image' when calling EditApi.edit_composite_basic"
|
113
111
|
end
|
114
112
|
# resource path
|
115
|
-
local_var_path =
|
113
|
+
local_var_path = '/image/edit/composite/{location}'.sub('{' + 'location' + '}', location.to_s)
|
116
114
|
|
117
115
|
# query parameters
|
118
116
|
query_params = {}
|
@@ -126,8 +124,8 @@ module CloudmersiveImageRecognitionApiClient
|
|
126
124
|
|
127
125
|
# form parameters
|
128
126
|
form_params = {}
|
129
|
-
form_params[
|
130
|
-
form_params[
|
127
|
+
form_params['baseImage'] = base_image
|
128
|
+
form_params['layeredImage'] = layered_image
|
131
129
|
|
132
130
|
# http body (model)
|
133
131
|
post_body = nil
|
@@ -144,7 +142,86 @@ module CloudmersiveImageRecognitionApiClient
|
|
144
142
|
end
|
145
143
|
return data, status_code, headers
|
146
144
|
end
|
145
|
+
# Composite two images together precisely
|
146
|
+
# Composites two input images together; a layered image onto a base image. Position is based on distance in pixels from each side. The first image you input is the base image. The second image (the layered image) will be composited on top of this base image. Supports PNG transparency. To control padding you can include transparent pixels at the border(s) of your layered images as appropriate. Providing multiple parameters in a single axis (for example top and bottom) is not recommended, since only one of the parameters will be used per axis.
|
147
|
+
# @param base_image Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
148
|
+
# @param layered_image Image to layer on top of the base image.
|
149
|
+
# @param [Hash] opts the optional parameters
|
150
|
+
# @option opts [Integer] :top Optional; Desired distance in pixels from the top of the base image to the top of the layered image.
|
151
|
+
# @option opts [Integer] :bottom Optional; Desired distance in pixels from the bottom of the base image to the bottom of the layered image.
|
152
|
+
# @option opts [Integer] :left Optional; Desired distance in pixels from the left side of the base image to the left side of the layered image.
|
153
|
+
# @option opts [Integer] :right Optional; Desired distance in pixels from the right side of the base image to the right side of the layered image.
|
154
|
+
# @option opts [Integer] :width Optional; Desired width of the layered image in pixels. Leave height empty or 0 to automatically scale the image proportionally.
|
155
|
+
# @option opts [Integer] :height Optional; Desired height of the layered image in pixels. Leave width empty or 0 to automatically scale the image proportionally.
|
156
|
+
# @return [String]
|
157
|
+
def edit_composite_precise(base_image, layered_image, opts = {})
|
158
|
+
data, _status_code, _headers = edit_composite_precise_with_http_info(base_image, layered_image, opts)
|
159
|
+
data
|
160
|
+
end
|
161
|
+
|
162
|
+
# Composite two images together precisely
|
163
|
+
# Composites two input images together; a layered image onto a base image. Position is based on distance in pixels from each side. The first image you input is the base image. The second image (the layered image) will be composited on top of this base image. Supports PNG transparency. To control padding you can include transparent pixels at the border(s) of your layered images as appropriate. Providing multiple parameters in a single axis (for example top and bottom) is not recommended, since only one of the parameters will be used per axis.
|
164
|
+
# @param base_image Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
165
|
+
# @param layered_image Image to layer on top of the base image.
|
166
|
+
# @param [Hash] opts the optional parameters
|
167
|
+
# @option opts [Integer] :top Optional; Desired distance in pixels from the top of the base image to the top of the layered image.
|
168
|
+
# @option opts [Integer] :bottom Optional; Desired distance in pixels from the bottom of the base image to the bottom of the layered image.
|
169
|
+
# @option opts [Integer] :left Optional; Desired distance in pixels from the left side of the base image to the left side of the layered image.
|
170
|
+
# @option opts [Integer] :right Optional; Desired distance in pixels from the right side of the base image to the right side of the layered image.
|
171
|
+
# @option opts [Integer] :width Optional; Desired width of the layered image in pixels. Leave height empty or 0 to automatically scale the image proportionally.
|
172
|
+
# @option opts [Integer] :height Optional; Desired height of the layered image in pixels. Leave width empty or 0 to automatically scale the image proportionally.
|
173
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
174
|
+
def edit_composite_precise_with_http_info(base_image, layered_image, opts = {})
|
175
|
+
if @api_client.config.debugging
|
176
|
+
@api_client.config.logger.debug 'Calling API: EditApi.edit_composite_precise ...'
|
177
|
+
end
|
178
|
+
# verify the required parameter 'base_image' is set
|
179
|
+
if @api_client.config.client_side_validation && base_image.nil?
|
180
|
+
fail ArgumentError, "Missing the required parameter 'base_image' when calling EditApi.edit_composite_precise"
|
181
|
+
end
|
182
|
+
# verify the required parameter 'layered_image' is set
|
183
|
+
if @api_client.config.client_side_validation && layered_image.nil?
|
184
|
+
fail ArgumentError, "Missing the required parameter 'layered_image' when calling EditApi.edit_composite_precise"
|
185
|
+
end
|
186
|
+
# resource path
|
187
|
+
local_var_path = '/image/edit/composite/precise'
|
188
|
+
|
189
|
+
# query parameters
|
190
|
+
query_params = {}
|
191
|
+
|
192
|
+
# header parameters
|
193
|
+
header_params = {}
|
194
|
+
# HTTP header 'Accept' (if needed)
|
195
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
196
|
+
# HTTP header 'Content-Type'
|
197
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
198
|
+
header_params[:'top'] = opts[:'top'] if !opts[:'top'].nil?
|
199
|
+
header_params[:'bottom'] = opts[:'bottom'] if !opts[:'bottom'].nil?
|
200
|
+
header_params[:'left'] = opts[:'left'] if !opts[:'left'].nil?
|
201
|
+
header_params[:'right'] = opts[:'right'] if !opts[:'right'].nil?
|
202
|
+
header_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
|
203
|
+
header_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
|
147
204
|
|
205
|
+
# form parameters
|
206
|
+
form_params = {}
|
207
|
+
form_params['baseImage'] = base_image
|
208
|
+
form_params['layeredImage'] = layered_image
|
209
|
+
|
210
|
+
# http body (model)
|
211
|
+
post_body = nil
|
212
|
+
auth_names = ['Apikey']
|
213
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
214
|
+
:header_params => header_params,
|
215
|
+
:query_params => query_params,
|
216
|
+
:form_params => form_params,
|
217
|
+
:body => post_body,
|
218
|
+
:auth_names => auth_names,
|
219
|
+
:return_type => 'String')
|
220
|
+
if @api_client.config.debugging
|
221
|
+
@api_client.config.logger.debug "API called: EditApi#edit_composite_precise\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
222
|
+
end
|
223
|
+
return data, status_code, headers
|
224
|
+
end
|
148
225
|
# Adaptively adjust the contrast of the image to be more appealing and easy to see
|
149
226
|
# Uses Gamma to adjust the contrast adaptively the way the human eye sees the world. Results significantly improve the viewability and visual appeal of the image.
|
150
227
|
# @param gamma Gamma value to adjust the contrast in the image. Recommended value is 2.0. Values between 0.0 and 1.0 will reduce contrast, while values above 1.0 will increase contrast.
|
@@ -153,7 +230,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
153
230
|
# @return [String]
|
154
231
|
def edit_contrast_adaptive(gamma, image_file, opts = {})
|
155
232
|
data, _status_code, _headers = edit_contrast_adaptive_with_http_info(gamma, image_file, opts)
|
156
|
-
|
233
|
+
data
|
157
234
|
end
|
158
235
|
|
159
236
|
# Adaptively adjust the contrast of the image to be more appealing and easy to see
|
@@ -164,7 +241,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
164
241
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
165
242
|
def edit_contrast_adaptive_with_http_info(gamma, image_file, opts = {})
|
166
243
|
if @api_client.config.debugging
|
167
|
-
@api_client.config.logger.debug
|
244
|
+
@api_client.config.logger.debug 'Calling API: EditApi.edit_contrast_adaptive ...'
|
168
245
|
end
|
169
246
|
# verify the required parameter 'gamma' is set
|
170
247
|
if @api_client.config.client_side_validation && gamma.nil?
|
@@ -175,7 +252,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
175
252
|
fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_contrast_adaptive"
|
176
253
|
end
|
177
254
|
# resource path
|
178
|
-
local_var_path =
|
255
|
+
local_var_path = '/image/edit/contrast/{gamma}/adaptive'.sub('{' + 'gamma' + '}', gamma.to_s)
|
179
256
|
|
180
257
|
# query parameters
|
181
258
|
query_params = {}
|
@@ -189,7 +266,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
189
266
|
|
190
267
|
# form parameters
|
191
268
|
form_params = {}
|
192
|
-
form_params[
|
269
|
+
form_params['imageFile'] = image_file
|
193
270
|
|
194
271
|
# http body (model)
|
195
272
|
post_body = nil
|
@@ -206,7 +283,79 @@ module CloudmersiveImageRecognitionApiClient
|
|
206
283
|
end
|
207
284
|
return data, status_code, headers
|
208
285
|
end
|
286
|
+
# Crop an image to an circular area
|
287
|
+
# Crop an image to a target circular area
|
288
|
+
# @param left The left edge of the circular crop area in pixels (X).
|
289
|
+
# @param top The top edge of the circular crop area in pixels (Y).
|
290
|
+
# @param radius The radius of the circular crop area in pixels.
|
291
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
292
|
+
# @param [Hash] opts the optional parameters
|
293
|
+
# @return [String]
|
294
|
+
def edit_crop_circle(left, top, radius, image_file, opts = {})
|
295
|
+
data, _status_code, _headers = edit_crop_circle_with_http_info(left, top, radius, image_file, opts)
|
296
|
+
data
|
297
|
+
end
|
209
298
|
|
299
|
+
# Crop an image to an circular area
|
300
|
+
# Crop an image to a target circular area
|
301
|
+
# @param left The left edge of the circular crop area in pixels (X).
|
302
|
+
# @param top The top edge of the circular crop area in pixels (Y).
|
303
|
+
# @param radius The radius of the circular crop area in pixels.
|
304
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
305
|
+
# @param [Hash] opts the optional parameters
|
306
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
307
|
+
def edit_crop_circle_with_http_info(left, top, radius, image_file, opts = {})
|
308
|
+
if @api_client.config.debugging
|
309
|
+
@api_client.config.logger.debug 'Calling API: EditApi.edit_crop_circle ...'
|
310
|
+
end
|
311
|
+
# verify the required parameter 'left' is set
|
312
|
+
if @api_client.config.client_side_validation && left.nil?
|
313
|
+
fail ArgumentError, "Missing the required parameter 'left' when calling EditApi.edit_crop_circle"
|
314
|
+
end
|
315
|
+
# verify the required parameter 'top' is set
|
316
|
+
if @api_client.config.client_side_validation && top.nil?
|
317
|
+
fail ArgumentError, "Missing the required parameter 'top' when calling EditApi.edit_crop_circle"
|
318
|
+
end
|
319
|
+
# verify the required parameter 'radius' is set
|
320
|
+
if @api_client.config.client_side_validation && radius.nil?
|
321
|
+
fail ArgumentError, "Missing the required parameter 'radius' when calling EditApi.edit_crop_circle"
|
322
|
+
end
|
323
|
+
# verify the required parameter 'image_file' is set
|
324
|
+
if @api_client.config.client_side_validation && image_file.nil?
|
325
|
+
fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_crop_circle"
|
326
|
+
end
|
327
|
+
# resource path
|
328
|
+
local_var_path = '/image/edit/crop/circle/{left}/{top}/{radius}'.sub('{' + 'left' + '}', left.to_s).sub('{' + 'top' + '}', top.to_s).sub('{' + 'radius' + '}', radius.to_s)
|
329
|
+
|
330
|
+
# query parameters
|
331
|
+
query_params = {}
|
332
|
+
|
333
|
+
# header parameters
|
334
|
+
header_params = {}
|
335
|
+
# HTTP header 'Accept' (if needed)
|
336
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
337
|
+
# HTTP header 'Content-Type'
|
338
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
339
|
+
|
340
|
+
# form parameters
|
341
|
+
form_params = {}
|
342
|
+
form_params['imageFile'] = image_file
|
343
|
+
|
344
|
+
# http body (model)
|
345
|
+
post_body = nil
|
346
|
+
auth_names = ['Apikey']
|
347
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
348
|
+
:header_params => header_params,
|
349
|
+
:query_params => query_params,
|
350
|
+
:form_params => form_params,
|
351
|
+
:body => post_body,
|
352
|
+
:auth_names => auth_names,
|
353
|
+
:return_type => 'String')
|
354
|
+
if @api_client.config.debugging
|
355
|
+
@api_client.config.logger.debug "API called: EditApi#edit_crop_circle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
356
|
+
end
|
357
|
+
return data, status_code, headers
|
358
|
+
end
|
210
359
|
# Crop an image to a rectangular area
|
211
360
|
# Crop an image to a target rectangular area
|
212
361
|
# @param left The left edge of the rectangular crop area in pixels (X).
|
@@ -218,7 +367,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
218
367
|
# @return [String]
|
219
368
|
def edit_crop_rectangle(left, top, width, height, image_file, opts = {})
|
220
369
|
data, _status_code, _headers = edit_crop_rectangle_with_http_info(left, top, width, height, image_file, opts)
|
221
|
-
|
370
|
+
data
|
222
371
|
end
|
223
372
|
|
224
373
|
# Crop an image to a rectangular area
|
@@ -232,7 +381,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
232
381
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
233
382
|
def edit_crop_rectangle_with_http_info(left, top, width, height, image_file, opts = {})
|
234
383
|
if @api_client.config.debugging
|
235
|
-
@api_client.config.logger.debug
|
384
|
+
@api_client.config.logger.debug 'Calling API: EditApi.edit_crop_rectangle ...'
|
236
385
|
end
|
237
386
|
# verify the required parameter 'left' is set
|
238
387
|
if @api_client.config.client_side_validation && left.nil?
|
@@ -255,7 +404,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
255
404
|
fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_crop_rectangle"
|
256
405
|
end
|
257
406
|
# resource path
|
258
|
-
local_var_path =
|
407
|
+
local_var_path = '/image/edit/crop/rectangle/{left}/{top}/{width}/{height}'.sub('{' + 'left' + '}', left.to_s).sub('{' + 'top' + '}', top.to_s).sub('{' + 'width' + '}', width.to_s).sub('{' + 'height' + '}', height.to_s)
|
259
408
|
|
260
409
|
# query parameters
|
261
410
|
query_params = {}
|
@@ -269,7 +418,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
269
418
|
|
270
419
|
# form parameters
|
271
420
|
form_params = {}
|
272
|
-
form_params[
|
421
|
+
form_params['imageFile'] = image_file
|
273
422
|
|
274
423
|
# http body (model)
|
275
424
|
post_body = nil
|
@@ -286,7 +435,6 @@ module CloudmersiveImageRecognitionApiClient
|
|
286
435
|
end
|
287
436
|
return data, status_code, headers
|
288
437
|
end
|
289
|
-
|
290
438
|
# Draw a polygon onto an image
|
291
439
|
# Draw one or more polygons, with customized visuals, onto an image
|
292
440
|
# @param request Polygon drawing request parameters
|
@@ -294,7 +442,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
294
442
|
# @return [String]
|
295
443
|
def edit_draw_polygon(request, opts = {})
|
296
444
|
data, _status_code, _headers = edit_draw_polygon_with_http_info(request, opts)
|
297
|
-
|
445
|
+
data
|
298
446
|
end
|
299
447
|
|
300
448
|
# Draw a polygon onto an image
|
@@ -304,14 +452,14 @@ module CloudmersiveImageRecognitionApiClient
|
|
304
452
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
305
453
|
def edit_draw_polygon_with_http_info(request, opts = {})
|
306
454
|
if @api_client.config.debugging
|
307
|
-
@api_client.config.logger.debug
|
455
|
+
@api_client.config.logger.debug 'Calling API: EditApi.edit_draw_polygon ...'
|
308
456
|
end
|
309
457
|
# verify the required parameter 'request' is set
|
310
458
|
if @api_client.config.client_side_validation && request.nil?
|
311
459
|
fail ArgumentError, "Missing the required parameter 'request' when calling EditApi.edit_draw_polygon"
|
312
460
|
end
|
313
461
|
# resource path
|
314
|
-
local_var_path =
|
462
|
+
local_var_path = '/image/edit/draw/polygon'
|
315
463
|
|
316
464
|
# query parameters
|
317
465
|
query_params = {}
|
@@ -341,7 +489,6 @@ module CloudmersiveImageRecognitionApiClient
|
|
341
489
|
end
|
342
490
|
return data, status_code, headers
|
343
491
|
end
|
344
|
-
|
345
492
|
# Draw a rectangle onto an image
|
346
493
|
# Draw one or more rectangles, with customized visuals, onto an image
|
347
494
|
# @param request Draw rectangle parameters
|
@@ -349,7 +496,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
349
496
|
# @return [String]
|
350
497
|
def edit_draw_rectangle(request, opts = {})
|
351
498
|
data, _status_code, _headers = edit_draw_rectangle_with_http_info(request, opts)
|
352
|
-
|
499
|
+
data
|
353
500
|
end
|
354
501
|
|
355
502
|
# Draw a rectangle onto an image
|
@@ -359,14 +506,14 @@ module CloudmersiveImageRecognitionApiClient
|
|
359
506
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
360
507
|
def edit_draw_rectangle_with_http_info(request, opts = {})
|
361
508
|
if @api_client.config.debugging
|
362
|
-
@api_client.config.logger.debug
|
509
|
+
@api_client.config.logger.debug 'Calling API: EditApi.edit_draw_rectangle ...'
|
363
510
|
end
|
364
511
|
# verify the required parameter 'request' is set
|
365
512
|
if @api_client.config.client_side_validation && request.nil?
|
366
513
|
fail ArgumentError, "Missing the required parameter 'request' when calling EditApi.edit_draw_rectangle"
|
367
514
|
end
|
368
515
|
# resource path
|
369
|
-
local_var_path =
|
516
|
+
local_var_path = '/image/edit/draw/rectangle'
|
370
517
|
|
371
518
|
# query parameters
|
372
519
|
query_params = {}
|
@@ -396,7 +543,6 @@ module CloudmersiveImageRecognitionApiClient
|
|
396
543
|
end
|
397
544
|
return data, status_code, headers
|
398
545
|
end
|
399
|
-
|
400
546
|
# Draw text onto an image
|
401
547
|
# Draw one or more pieces of text, with customized visuals, onto an image
|
402
548
|
# @param request Draw text parameters
|
@@ -404,7 +550,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
404
550
|
# @return [String]
|
405
551
|
def edit_draw_text(request, opts = {})
|
406
552
|
data, _status_code, _headers = edit_draw_text_with_http_info(request, opts)
|
407
|
-
|
553
|
+
data
|
408
554
|
end
|
409
555
|
|
410
556
|
# Draw text onto an image
|
@@ -414,14 +560,14 @@ module CloudmersiveImageRecognitionApiClient
|
|
414
560
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
415
561
|
def edit_draw_text_with_http_info(request, opts = {})
|
416
562
|
if @api_client.config.debugging
|
417
|
-
@api_client.config.logger.debug
|
563
|
+
@api_client.config.logger.debug 'Calling API: EditApi.edit_draw_text ...'
|
418
564
|
end
|
419
565
|
# verify the required parameter 'request' is set
|
420
566
|
if @api_client.config.client_side_validation && request.nil?
|
421
567
|
fail ArgumentError, "Missing the required parameter 'request' when calling EditApi.edit_draw_text"
|
422
568
|
end
|
423
569
|
# resource path
|
424
|
-
local_var_path =
|
570
|
+
local_var_path = '/image/edit/draw/text'
|
425
571
|
|
426
572
|
# query parameters
|
427
573
|
query_params = {}
|
@@ -451,7 +597,6 @@ module CloudmersiveImageRecognitionApiClient
|
|
451
597
|
end
|
452
598
|
return data, status_code, headers
|
453
599
|
end
|
454
|
-
|
455
600
|
# Add a customizeable drop shadow to an image
|
456
601
|
# Add a customizeable drop shadow to the image
|
457
602
|
# @param x Horizontal (X) offset of the drop shadow
|
@@ -463,7 +608,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
463
608
|
# @return [String]
|
464
609
|
def edit_drop_shadow(x, y, sigma, opacity, image_file, opts = {})
|
465
610
|
data, _status_code, _headers = edit_drop_shadow_with_http_info(x, y, sigma, opacity, image_file, opts)
|
466
|
-
|
611
|
+
data
|
467
612
|
end
|
468
613
|
|
469
614
|
# Add a customizeable drop shadow to an image
|
@@ -477,7 +622,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
477
622
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
478
623
|
def edit_drop_shadow_with_http_info(x, y, sigma, opacity, image_file, opts = {})
|
479
624
|
if @api_client.config.debugging
|
480
|
-
@api_client.config.logger.debug
|
625
|
+
@api_client.config.logger.debug 'Calling API: EditApi.edit_drop_shadow ...'
|
481
626
|
end
|
482
627
|
# verify the required parameter 'x' is set
|
483
628
|
if @api_client.config.client_side_validation && x.nil?
|
@@ -500,7 +645,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
500
645
|
fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_drop_shadow"
|
501
646
|
end
|
502
647
|
# resource path
|
503
|
-
local_var_path =
|
648
|
+
local_var_path = '/image/edit/drop-shadow/{X}/{Y}/{sigma}/{opacity}'.sub('{' + 'X' + '}', x.to_s).sub('{' + 'Y' + '}', y.to_s).sub('{' + 'sigma' + '}', sigma.to_s).sub('{' + 'opacity' + '}', opacity.to_s)
|
504
649
|
|
505
650
|
# query parameters
|
506
651
|
query_params = {}
|
@@ -514,7 +659,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
514
659
|
|
515
660
|
# form parameters
|
516
661
|
form_params = {}
|
517
|
-
form_params[
|
662
|
+
form_params['imageFile'] = image_file
|
518
663
|
|
519
664
|
# http body (model)
|
520
665
|
post_body = nil
|
@@ -531,7 +676,6 @@ module CloudmersiveImageRecognitionApiClient
|
|
531
676
|
end
|
532
677
|
return data, status_code, headers
|
533
678
|
end
|
534
|
-
|
535
679
|
# Invert, negate the colors in the image
|
536
680
|
# Inverts (negates) all of the colors in the image. If the image contains transparency, the transparency will first be removed prior to inverting the image.
|
537
681
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
@@ -539,7 +683,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
539
683
|
# @return [String]
|
540
684
|
def edit_invert(image_file, opts = {})
|
541
685
|
data, _status_code, _headers = edit_invert_with_http_info(image_file, opts)
|
542
|
-
|
686
|
+
data
|
543
687
|
end
|
544
688
|
|
545
689
|
# Invert, negate the colors in the image
|
@@ -549,14 +693,14 @@ module CloudmersiveImageRecognitionApiClient
|
|
549
693
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
550
694
|
def edit_invert_with_http_info(image_file, opts = {})
|
551
695
|
if @api_client.config.debugging
|
552
|
-
@api_client.config.logger.debug
|
696
|
+
@api_client.config.logger.debug 'Calling API: EditApi.edit_invert ...'
|
553
697
|
end
|
554
698
|
# verify the required parameter 'image_file' is set
|
555
699
|
if @api_client.config.client_side_validation && image_file.nil?
|
556
700
|
fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_invert"
|
557
701
|
end
|
558
702
|
# resource path
|
559
|
-
local_var_path =
|
703
|
+
local_var_path = '/image/edit/invert'
|
560
704
|
|
561
705
|
# query parameters
|
562
706
|
query_params = {}
|
@@ -570,7 +714,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
570
714
|
|
571
715
|
# form parameters
|
572
716
|
form_params = {}
|
573
|
-
form_params[
|
717
|
+
form_params['imageFile'] = image_file
|
574
718
|
|
575
719
|
# http body (model)
|
576
720
|
post_body = nil
|
@@ -587,7 +731,6 @@ module CloudmersiveImageRecognitionApiClient
|
|
587
731
|
end
|
588
732
|
return data, status_code, headers
|
589
733
|
end
|
590
|
-
|
591
734
|
# Remove EXIF data from the image
|
592
735
|
# Removes any EXIF data and profiles .
|
593
736
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
@@ -595,7 +738,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
595
738
|
# @return [String]
|
596
739
|
def edit_remove_exif_data(image_file, opts = {})
|
597
740
|
data, _status_code, _headers = edit_remove_exif_data_with_http_info(image_file, opts)
|
598
|
-
|
741
|
+
data
|
599
742
|
end
|
600
743
|
|
601
744
|
# Remove EXIF data from the image
|
@@ -605,14 +748,14 @@ module CloudmersiveImageRecognitionApiClient
|
|
605
748
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
606
749
|
def edit_remove_exif_data_with_http_info(image_file, opts = {})
|
607
750
|
if @api_client.config.debugging
|
608
|
-
@api_client.config.logger.debug
|
751
|
+
@api_client.config.logger.debug 'Calling API: EditApi.edit_remove_exif_data ...'
|
609
752
|
end
|
610
753
|
# verify the required parameter 'image_file' is set
|
611
754
|
if @api_client.config.client_side_validation && image_file.nil?
|
612
755
|
fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_remove_exif_data"
|
613
756
|
end
|
614
757
|
# resource path
|
615
|
-
local_var_path =
|
758
|
+
local_var_path = '/image/edit/remove-exif'
|
616
759
|
|
617
760
|
# query parameters
|
618
761
|
query_params = {}
|
@@ -626,7 +769,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
626
769
|
|
627
770
|
# form parameters
|
628
771
|
form_params = {}
|
629
|
-
form_params[
|
772
|
+
form_params['imageFile'] = image_file
|
630
773
|
|
631
774
|
# http body (model)
|
632
775
|
post_body = nil
|
@@ -643,7 +786,6 @@ module CloudmersiveImageRecognitionApiClient
|
|
643
786
|
end
|
644
787
|
return data, status_code, headers
|
645
788
|
end
|
646
|
-
|
647
789
|
# Remove transparency from the image
|
648
790
|
# Removes any active transparency in the image. Effectively renders the image at the same resolution, in the same file format, over a white background, thus removing transparency.
|
649
791
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
@@ -651,7 +793,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
651
793
|
# @return [String]
|
652
794
|
def edit_remove_transparency(image_file, opts = {})
|
653
795
|
data, _status_code, _headers = edit_remove_transparency_with_http_info(image_file, opts)
|
654
|
-
|
796
|
+
data
|
655
797
|
end
|
656
798
|
|
657
799
|
# Remove transparency from the image
|
@@ -661,14 +803,14 @@ module CloudmersiveImageRecognitionApiClient
|
|
661
803
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
662
804
|
def edit_remove_transparency_with_http_info(image_file, opts = {})
|
663
805
|
if @api_client.config.debugging
|
664
|
-
@api_client.config.logger.debug
|
806
|
+
@api_client.config.logger.debug 'Calling API: EditApi.edit_remove_transparency ...'
|
665
807
|
end
|
666
808
|
# verify the required parameter 'image_file' is set
|
667
809
|
if @api_client.config.client_side_validation && image_file.nil?
|
668
810
|
fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_remove_transparency"
|
669
811
|
end
|
670
812
|
# resource path
|
671
|
-
local_var_path =
|
813
|
+
local_var_path = '/image/edit/remove-transparency'
|
672
814
|
|
673
815
|
# query parameters
|
674
816
|
query_params = {}
|
@@ -682,7 +824,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
682
824
|
|
683
825
|
# form parameters
|
684
826
|
form_params = {}
|
685
|
-
form_params[
|
827
|
+
form_params['imageFile'] = image_file
|
686
828
|
|
687
829
|
# http body (model)
|
688
830
|
post_body = nil
|
@@ -699,7 +841,6 @@ module CloudmersiveImageRecognitionApiClient
|
|
699
841
|
end
|
700
842
|
return data, status_code, headers
|
701
843
|
end
|
702
|
-
|
703
844
|
# Rotate an image any number of degrees
|
704
845
|
# Rotates an image by an arbitrary number of degrees
|
705
846
|
# @param degrees Degrees to rotate the image; values range from 0.0 to 360.0.
|
@@ -708,7 +849,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
708
849
|
# @return [String]
|
709
850
|
def edit_rotate(degrees, image_file, opts = {})
|
710
851
|
data, _status_code, _headers = edit_rotate_with_http_info(degrees, image_file, opts)
|
711
|
-
|
852
|
+
data
|
712
853
|
end
|
713
854
|
|
714
855
|
# Rotate an image any number of degrees
|
@@ -719,7 +860,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
719
860
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
720
861
|
def edit_rotate_with_http_info(degrees, image_file, opts = {})
|
721
862
|
if @api_client.config.debugging
|
722
|
-
@api_client.config.logger.debug
|
863
|
+
@api_client.config.logger.debug 'Calling API: EditApi.edit_rotate ...'
|
723
864
|
end
|
724
865
|
# verify the required parameter 'degrees' is set
|
725
866
|
if @api_client.config.client_side_validation && degrees.nil?
|
@@ -730,7 +871,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
730
871
|
fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_rotate"
|
731
872
|
end
|
732
873
|
# resource path
|
733
|
-
local_var_path =
|
874
|
+
local_var_path = '/image/edit/rotate/{degrees}/angle'.sub('{' + 'degrees' + '}', degrees.to_s)
|
734
875
|
|
735
876
|
# query parameters
|
736
877
|
query_params = {}
|
@@ -744,7 +885,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
744
885
|
|
745
886
|
# form parameters
|
746
887
|
form_params = {}
|
747
|
-
form_params[
|
888
|
+
form_params['imageFile'] = image_file
|
748
889
|
|
749
890
|
# http body (model)
|
750
891
|
post_body = nil
|