Class: CloudmersiveImageRecognitionApiClient::EditApi
- Inherits:
-
Object
- Object
- CloudmersiveImageRecognitionApiClient::EditApi
- Defined in:
- lib/cloudmersive-image-recognition-api-client/api/edit_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#edit_auto_orient(image_file, opts = {}) ⇒ String
Normalizes image rotation and removes EXIF rotation data Automatically orients the input image based on EXIF information and then removes the EXIF information.
-
#edit_auto_orient_with_http_info(image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Normalizes image rotation and removes EXIF rotation data Automatically orients the input image based on EXIF information and then removes the EXIF information.
-
#edit_composite_basic(location, base_image, layered_image, opts = {}) ⇒ String
Composite two images together Composites two input images together; a layered image onto a base image.
-
#edit_composite_basic_with_http_info(location, base_image, layered_image, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Composite two images together Composites two input images together; a layered image onto a base image.
-
#edit_composite_precise(base_image, layered_image, opts = {}) ⇒ String
Composite two images together precisely Composites two input images together; a layered image onto a base image.
-
#edit_composite_precise_with_http_info(base_image, layered_image, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Composite two images together precisely Composites two input images together; a layered image onto a base image.
-
#edit_contrast_adaptive(gamma, image_file, opts = {}) ⇒ String
Adaptively adjust the contrast of the image to be more appealing and easy to see Uses Gamma to adjust the contrast adaptively the way the human eye sees the world.
-
#edit_contrast_adaptive_with_http_info(gamma, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Adaptively adjust the contrast of the image to be more appealing and easy to see Uses Gamma to adjust the contrast adaptively the way the human eye sees the world.
-
#edit_crop_circle(left, top, radius, image_file, opts = {}) ⇒ String
Crop an image to an circular area Crop an image to a target circular area.
-
#edit_crop_circle_with_http_info(left, top, radius, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Crop an image to an circular area Crop an image to a target circular area.
-
#edit_crop_rectangle(left, top, width, height, image_file, opts = {}) ⇒ String
Crop an image to a rectangular area Crop an image to a target rectangular area.
-
#edit_crop_rectangle_with_http_info(left, top, width, height, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Crop an image to a rectangular area Crop an image to a target rectangular area.
-
#edit_draw_polygon(request, opts = {}) ⇒ String
Draw a polygon onto an image Draw one or more polygons, with customized visuals, onto an image.
-
#edit_draw_polygon_with_http_info(request, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Draw a polygon onto an image Draw one or more polygons, with customized visuals, onto an image.
-
#edit_draw_rectangle(request, opts = {}) ⇒ String
Draw a rectangle onto an image Draw one or more rectangles, with customized visuals, onto an image.
-
#edit_draw_rectangle_with_http_info(request, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Draw a rectangle onto an image Draw one or more rectangles, with customized visuals, onto an image.
-
#edit_draw_text(request, opts = {}) ⇒ String
Draw text onto an image Draw one or more pieces of text, with customized visuals, onto an image.
-
#edit_draw_text_with_http_info(request, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Draw text onto an image Draw one or more pieces of text, with customized visuals, onto an image.
-
#edit_drop_shadow(x, y, sigma, opacity, image_file, opts = {}) ⇒ String
Add a customizeable drop shadow to an image Add a customizeable drop shadow to the image.
-
#edit_drop_shadow_with_http_info(x, y, sigma, opacity, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Add a customizeable drop shadow to an image Add a customizeable drop shadow to the image.
-
#edit_invert(image_file, opts = {}) ⇒ String
Invert, negate the colors in the image Inverts (negates) all of the colors in the image.
-
#edit_invert_with_http_info(image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Invert, negate the colors in the image Inverts (negates) all of the colors in the image.
-
#edit_remove_exif_data(image_file, opts = {}) ⇒ String
Remove EXIF data from the image Removes any EXIF data and profiles .
-
#edit_remove_exif_data_with_http_info(image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Remove EXIF data from the image Removes any EXIF data and profiles .
-
#edit_remove_transparency(image_file, opts = {}) ⇒ String
Remove transparency from the image Removes any active transparency in the image.
-
#edit_remove_transparency_with_http_info(image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Remove transparency from the image Removes any active transparency in the image.
-
#edit_rotate(degrees, image_file, opts = {}) ⇒ String
Rotate an image any number of degrees Rotates an image by an arbitrary number of degrees.
-
#edit_rotate_with_http_info(degrees, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Rotate an image any number of degrees Rotates an image by an arbitrary number of degrees.
-
#initialize(api_client = ApiClient.default) ⇒ EditApi
constructor
A new instance of EditApi.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#edit_auto_orient(image_file, opts = {}) ⇒ String
Normalizes image rotation and removes EXIF rotation data 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.
27 28 29 30 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 27 def edit_auto_orient(image_file, opts = {}) data, _status_code, _headers = edit_auto_orient_with_http_info(image_file, opts) data end |
#edit_auto_orient_with_http_info(image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Normalizes image rotation and removes EXIF rotation data 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.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 37 def edit_auto_orient_with_http_info(image_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditApi.edit_auto_orient ...' end # verify the required parameter 'image_file' is set if @api_client.config.client_side_validation && image_file.nil? fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_auto_orient" end # resource path local_var_path = '/image/edit/auto-orient/remove-exif' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['imageFile'] = image_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditApi#edit_auto_orient\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_composite_basic(location, base_image, layered_image, opts = {}) ⇒ String
Composite two images together 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.
84 85 86 87 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 84 def edit_composite_basic(location, base_image, layered_image, opts = {}) data, _status_code, _headers = edit_composite_basic_with_http_info(location, base_image, layered_image, opts) data end |
#edit_composite_basic_with_http_info(location, base_image, layered_image, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Composite two images together 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.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 96 def edit_composite_basic_with_http_info(location, base_image, layered_image, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditApi.edit_composite_basic ...' end # verify the required parameter 'location' is set if @api_client.config.client_side_validation && location.nil? fail ArgumentError, "Missing the required parameter 'location' when calling EditApi.edit_composite_basic" end # verify the required parameter 'base_image' is set if @api_client.config.client_side_validation && base_image.nil? fail ArgumentError, "Missing the required parameter 'base_image' when calling EditApi.edit_composite_basic" end # verify the required parameter 'layered_image' is set if @api_client.config.client_side_validation && layered_image.nil? fail ArgumentError, "Missing the required parameter 'layered_image' when calling EditApi.edit_composite_basic" end # resource path local_var_path = '/image/edit/composite/{location}'.sub('{' + 'location' + '}', location.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['baseImage'] = base_image form_params['layeredImage'] = layered_image # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditApi#edit_composite_basic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_composite_precise(base_image, layered_image, opts = {}) ⇒ String
Composite two images together precisely 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.
157 158 159 160 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 157 def edit_composite_precise(base_image, layered_image, opts = {}) data, _status_code, _headers = edit_composite_precise_with_http_info(base_image, layered_image, opts) data end |
#edit_composite_precise_with_http_info(base_image, layered_image, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Composite two images together precisely 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.
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 174 def edit_composite_precise_with_http_info(base_image, layered_image, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditApi.edit_composite_precise ...' end # verify the required parameter 'base_image' is set if @api_client.config.client_side_validation && base_image.nil? fail ArgumentError, "Missing the required parameter 'base_image' when calling EditApi.edit_composite_precise" end # verify the required parameter 'layered_image' is set if @api_client.config.client_side_validation && layered_image.nil? fail ArgumentError, "Missing the required parameter 'layered_image' when calling EditApi.edit_composite_precise" end # resource path local_var_path = '/image/edit/composite/precise' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'top'] = opts[:'top'] if !opts[:'top'].nil? header_params[:'bottom'] = opts[:'bottom'] if !opts[:'bottom'].nil? header_params[:'left'] = opts[:'left'] if !opts[:'left'].nil? header_params[:'right'] = opts[:'right'] if !opts[:'right'].nil? header_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? header_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? # form parameters form_params = {} form_params['baseImage'] = base_image form_params['layeredImage'] = layered_image # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditApi#edit_composite_precise\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_contrast_adaptive(gamma, image_file, opts = {}) ⇒ String
Adaptively adjust the contrast of the image to be more appealing and easy to see 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.
231 232 233 234 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 231 def edit_contrast_adaptive(gamma, image_file, opts = {}) data, _status_code, _headers = edit_contrast_adaptive_with_http_info(gamma, image_file, opts) data end |
#edit_contrast_adaptive_with_http_info(gamma, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Adaptively adjust the contrast of the image to be more appealing and easy to see 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.
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 242 def edit_contrast_adaptive_with_http_info(gamma, image_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditApi.edit_contrast_adaptive ...' end # verify the required parameter 'gamma' is set if @api_client.config.client_side_validation && gamma.nil? fail ArgumentError, "Missing the required parameter 'gamma' when calling EditApi.edit_contrast_adaptive" end # verify the required parameter 'image_file' is set if @api_client.config.client_side_validation && image_file.nil? fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_contrast_adaptive" end # resource path local_var_path = '/image/edit/contrast/{gamma}/adaptive'.sub('{' + 'gamma' + '}', gamma.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['imageFile'] = image_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditApi#edit_contrast_adaptive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_crop_circle(left, top, radius, image_file, opts = {}) ⇒ String
Crop an image to an circular area Crop an image to a target circular area
294 295 296 297 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 294 def edit_crop_circle(left, top, radius, image_file, opts = {}) data, _status_code, _headers = edit_crop_circle_with_http_info(left, top, radius, image_file, opts) data end |
#edit_crop_circle_with_http_info(left, top, radius, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Crop an image to an circular area Crop an image to a target circular area
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 307 def edit_crop_circle_with_http_info(left, top, radius, image_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditApi.edit_crop_circle ...' end # verify the required parameter 'left' is set if @api_client.config.client_side_validation && left.nil? fail ArgumentError, "Missing the required parameter 'left' when calling EditApi.edit_crop_circle" end # verify the required parameter 'top' is set if @api_client.config.client_side_validation && top.nil? fail ArgumentError, "Missing the required parameter 'top' when calling EditApi.edit_crop_circle" end # verify the required parameter 'radius' is set if @api_client.config.client_side_validation && radius.nil? fail ArgumentError, "Missing the required parameter 'radius' when calling EditApi.edit_crop_circle" end # verify the required parameter 'image_file' is set if @api_client.config.client_side_validation && image_file.nil? fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_crop_circle" end # resource path 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) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['imageFile'] = image_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditApi#edit_crop_circle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_crop_rectangle(left, top, width, height, image_file, opts = {}) ⇒ String
Crop an image to a rectangular area Crop an image to a target rectangular area
368 369 370 371 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 368 def edit_crop_rectangle(left, top, width, height, image_file, opts = {}) data, _status_code, _headers = edit_crop_rectangle_with_http_info(left, top, width, height, image_file, opts) data end |
#edit_crop_rectangle_with_http_info(left, top, width, height, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Crop an image to a rectangular area Crop an image to a target rectangular area
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 382 def edit_crop_rectangle_with_http_info(left, top, width, height, image_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditApi.edit_crop_rectangle ...' end # verify the required parameter 'left' is set if @api_client.config.client_side_validation && left.nil? fail ArgumentError, "Missing the required parameter 'left' when calling EditApi.edit_crop_rectangle" end # verify the required parameter 'top' is set if @api_client.config.client_side_validation && top.nil? fail ArgumentError, "Missing the required parameter 'top' when calling EditApi.edit_crop_rectangle" end # verify the required parameter 'width' is set if @api_client.config.client_side_validation && width.nil? fail ArgumentError, "Missing the required parameter 'width' when calling EditApi.edit_crop_rectangle" end # verify the required parameter 'height' is set if @api_client.config.client_side_validation && height.nil? fail ArgumentError, "Missing the required parameter 'height' when calling EditApi.edit_crop_rectangle" end # verify the required parameter 'image_file' is set if @api_client.config.client_side_validation && image_file.nil? fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_crop_rectangle" end # resource path 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) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['imageFile'] = image_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditApi#edit_crop_rectangle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_draw_polygon(request, opts = {}) ⇒ String
Draw a polygon onto an image Draw one or more polygons, with customized visuals, onto an image
443 444 445 446 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 443 def edit_draw_polygon(request, opts = {}) data, _status_code, _headers = edit_draw_polygon_with_http_info(request, opts) data end |
#edit_draw_polygon_with_http_info(request, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Draw a polygon onto an image Draw one or more polygons, with customized visuals, onto an image
453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 453 def edit_draw_polygon_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditApi.edit_draw_polygon ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling EditApi.edit_draw_polygon" end # resource path local_var_path = '/image/edit/draw/polygon' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditApi#edit_draw_polygon\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_draw_rectangle(request, opts = {}) ⇒ String
Draw a rectangle onto an image Draw one or more rectangles, with customized visuals, onto an image
497 498 499 500 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 497 def edit_draw_rectangle(request, opts = {}) data, _status_code, _headers = edit_draw_rectangle_with_http_info(request, opts) data end |
#edit_draw_rectangle_with_http_info(request, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Draw a rectangle onto an image Draw one or more rectangles, with customized visuals, onto an image
507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 507 def edit_draw_rectangle_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditApi.edit_draw_rectangle ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling EditApi.edit_draw_rectangle" end # resource path local_var_path = '/image/edit/draw/rectangle' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditApi#edit_draw_rectangle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_draw_text(request, opts = {}) ⇒ String
Draw text onto an image Draw one or more pieces of text, with customized visuals, onto an image
551 552 553 554 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 551 def edit_draw_text(request, opts = {}) data, _status_code, _headers = edit_draw_text_with_http_info(request, opts) data end |
#edit_draw_text_with_http_info(request, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Draw text onto an image Draw one or more pieces of text, with customized visuals, onto an image
561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 561 def edit_draw_text_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditApi.edit_draw_text ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling EditApi.edit_draw_text" end # resource path local_var_path = '/image/edit/draw/text' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditApi#edit_draw_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_drop_shadow(x, y, sigma, opacity, image_file, opts = {}) ⇒ String
Add a customizeable drop shadow to an image Add a customizeable drop shadow to the image
609 610 611 612 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 609 def edit_drop_shadow(x, y, sigma, opacity, image_file, opts = {}) data, _status_code, _headers = edit_drop_shadow_with_http_info(x, y, sigma, opacity, image_file, opts) data end |
#edit_drop_shadow_with_http_info(x, y, sigma, opacity, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Add a customizeable drop shadow to an image Add a customizeable drop shadow to the image
623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 623 def edit_drop_shadow_with_http_info(x, y, sigma, opacity, image_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditApi.edit_drop_shadow ...' end # verify the required parameter 'x' is set if @api_client.config.client_side_validation && x.nil? fail ArgumentError, "Missing the required parameter 'x' when calling EditApi.edit_drop_shadow" end # verify the required parameter 'y' is set if @api_client.config.client_side_validation && y.nil? fail ArgumentError, "Missing the required parameter 'y' when calling EditApi.edit_drop_shadow" end # verify the required parameter 'sigma' is set if @api_client.config.client_side_validation && sigma.nil? fail ArgumentError, "Missing the required parameter 'sigma' when calling EditApi.edit_drop_shadow" end # verify the required parameter 'opacity' is set if @api_client.config.client_side_validation && opacity.nil? fail ArgumentError, "Missing the required parameter 'opacity' when calling EditApi.edit_drop_shadow" end # verify the required parameter 'image_file' is set if @api_client.config.client_side_validation && image_file.nil? fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_drop_shadow" end # resource path 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) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['imageFile'] = image_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditApi#edit_drop_shadow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_invert(image_file, opts = {}) ⇒ String
Invert, negate the colors in the image 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.
684 685 686 687 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 684 def edit_invert(image_file, opts = {}) data, _status_code, _headers = edit_invert_with_http_info(image_file, opts) data end |
#edit_invert_with_http_info(image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Invert, negate the colors in the image 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.
694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 694 def edit_invert_with_http_info(image_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditApi.edit_invert ...' end # verify the required parameter 'image_file' is set if @api_client.config.client_side_validation && image_file.nil? fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_invert" end # resource path local_var_path = '/image/edit/invert' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['imageFile'] = image_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditApi#edit_invert\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_remove_exif_data(image_file, opts = {}) ⇒ String
Remove EXIF data from the image Removes any EXIF data and profiles .
739 740 741 742 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 739 def edit_remove_exif_data(image_file, opts = {}) data, _status_code, _headers = edit_remove_exif_data_with_http_info(image_file, opts) data end |
#edit_remove_exif_data_with_http_info(image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Remove EXIF data from the image Removes any EXIF data and profiles .
749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 749 def edit_remove_exif_data_with_http_info(image_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditApi.edit_remove_exif_data ...' end # verify the required parameter 'image_file' is set if @api_client.config.client_side_validation && image_file.nil? fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_remove_exif_data" end # resource path local_var_path = '/image/edit/remove-exif' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['imageFile'] = image_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditApi#edit_remove_exif_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_remove_transparency(image_file, opts = {}) ⇒ String
Remove transparency from the image 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.
794 795 796 797 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 794 def edit_remove_transparency(image_file, opts = {}) data, _status_code, _headers = edit_remove_transparency_with_http_info(image_file, opts) data end |
#edit_remove_transparency_with_http_info(image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Remove transparency from the image 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.
804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 804 def edit_remove_transparency_with_http_info(image_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditApi.edit_remove_transparency ...' end # verify the required parameter 'image_file' is set if @api_client.config.client_side_validation && image_file.nil? fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_remove_transparency" end # resource path local_var_path = '/image/edit/remove-transparency' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['imageFile'] = image_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditApi#edit_remove_transparency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_rotate(degrees, image_file, opts = {}) ⇒ String
Rotate an image any number of degrees Rotates an image by an arbitrary number of degrees
850 851 852 853 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 850 def edit_rotate(degrees, image_file, opts = {}) data, _status_code, _headers = edit_rotate_with_http_info(degrees, image_file, opts) data end |
#edit_rotate_with_http_info(degrees, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Rotate an image any number of degrees Rotates an image by an arbitrary number of degrees
861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 |
# File 'lib/cloudmersive-image-recognition-api-client/api/edit_api.rb', line 861 def edit_rotate_with_http_info(degrees, image_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EditApi.edit_rotate ...' end # verify the required parameter 'degrees' is set if @api_client.config.client_side_validation && degrees.nil? fail ArgumentError, "Missing the required parameter 'degrees' when calling EditApi.edit_rotate" end # verify the required parameter 'image_file' is set if @api_client.config.client_side_validation && image_file.nil? fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_rotate" end # resource path local_var_path = '/image/edit/rotate/{degrees}/angle'.sub('{' + 'degrees' + '}', degrees.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['imageFile'] = image_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: EditApi#edit_rotate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |