cloudmersive-image-recognition-api-client 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +7 -0
  3. data/README.md +184 -0
  4. data/Rakefile +8 -0
  5. data/cloudmersive-image-recognition-api-client.gemspec +45 -0
  6. data/docs/AgeDetectionResult.md +10 -0
  7. data/docs/ArtisticApi.md +66 -0
  8. data/docs/ColorResult.md +10 -0
  9. data/docs/ConvertApi.md +396 -0
  10. data/docs/DetectedLicensePlate.md +14 -0
  11. data/docs/DetectedObject.md +13 -0
  12. data/docs/DominantColorResult.md +9 -0
  13. data/docs/DrawPolygonInstance.md +11 -0
  14. data/docs/DrawPolygonRequest.md +10 -0
  15. data/docs/DrawRectangleInstance.md +14 -0
  16. data/docs/DrawRectangleRequest.md +10 -0
  17. data/docs/DrawTextInstance.md +15 -0
  18. data/docs/DrawTextRequest.md +10 -0
  19. data/docs/EditApi.md +704 -0
  20. data/docs/Face.md +11 -0
  21. data/docs/FaceApi.md +396 -0
  22. data/docs/FaceCompareResponse.md +11 -0
  23. data/docs/FaceLocateResponse.md +11 -0
  24. data/docs/FaceLocateWithLandmarksResponse.md +11 -0
  25. data/docs/FaceMatch.md +13 -0
  26. data/docs/FacePoint.md +9 -0
  27. data/docs/FaceWithLandmarks.md +20 -0
  28. data/docs/FilterApi.md +478 -0
  29. data/docs/FindSymbolResult.md +13 -0
  30. data/docs/FineTextDetectionResult.md +10 -0
  31. data/docs/FineTextItem.md +18 -0
  32. data/docs/GenderDetectionResult.md +10 -0
  33. data/docs/ImageDescriptionResponse.md +11 -0
  34. data/docs/ImageMetadata.md +17 -0
  35. data/docs/ImageMetadataExifValue.md +10 -0
  36. data/docs/InfoApi.md +118 -0
  37. data/docs/NsfwApi.md +63 -0
  38. data/docs/NsfwResult.md +10 -0
  39. data/docs/ObjectDetectionResult.md +10 -0
  40. data/docs/PersonWithAge.md +11 -0
  41. data/docs/PersonWithGender.md +10 -0
  42. data/docs/PolygonPoint.md +9 -0
  43. data/docs/RecognitionOutcome.md +9 -0
  44. data/docs/RecognizeApi.md +455 -0
  45. data/docs/ResizeApi.md +130 -0
  46. data/docs/TextDetectionResult.md +10 -0
  47. data/docs/TextItem.md +11 -0
  48. data/docs/VehicleLicensePlateDetectionResult.md +10 -0
  49. data/git_push.sh +55 -0
  50. data/lib/cloudmersive-image-recognition-api-client.rb +82 -0
  51. data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +84 -0
  52. data/lib/cloudmersive-image-recognition-api-client/api/convert_api.rb +414 -0
  53. data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +753 -0
  54. data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +415 -0
  55. data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +525 -0
  56. data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +133 -0
  57. data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +78 -0
  58. data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +473 -0
  59. data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +157 -0
  60. data/lib/cloudmersive-image-recognition-api-client/api_client.rb +391 -0
  61. data/lib/cloudmersive-image-recognition-api-client/api_error.rb +38 -0
  62. data/lib/cloudmersive-image-recognition-api-client/configuration.rb +209 -0
  63. data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +208 -0
  64. data/lib/cloudmersive-image-recognition-api-client/models/color_result.rb +206 -0
  65. data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +246 -0
  66. data/lib/cloudmersive-image-recognition-api-client/models/detected_object.rb +236 -0
  67. data/lib/cloudmersive-image-recognition-api-client/models/dominant_color_result.rb +198 -0
  68. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_instance.rb +218 -0
  69. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_request.rb +223 -0
  70. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +246 -0
  71. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +223 -0
  72. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +256 -0
  73. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +223 -0
  74. data/lib/cloudmersive-image-recognition-api-client/models/face.rb +216 -0
  75. data/lib/cloudmersive-image-recognition-api-client/models/face_compare_response.rb +218 -0
  76. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +218 -0
  77. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response.rb +218 -0
  78. data/lib/cloudmersive-image-recognition-api-client/models/face_match.rb +236 -0
  79. data/lib/cloudmersive-image-recognition-api-client/models/face_point.rb +196 -0
  80. data/lib/cloudmersive-image-recognition-api-client/models/face_with_landmarks.rb +324 -0
  81. data/lib/cloudmersive-image-recognition-api-client/models/find_symbol_result.rb +236 -0
  82. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_detection_result.rb +208 -0
  83. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_item.rb +286 -0
  84. data/lib/cloudmersive-image-recognition-api-client/models/gender_detection_result.rb +208 -0
  85. data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +216 -0
  86. data/lib/cloudmersive-image-recognition-api-client/models/image_metadata.rb +278 -0
  87. data/lib/cloudmersive-image-recognition-api-client/models/image_metadata_exif_value.rb +206 -0
  88. data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +206 -0
  89. data/lib/cloudmersive-image-recognition-api-client/models/object_detection_result.rb +208 -0
  90. data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +215 -0
  91. data/lib/cloudmersive-image-recognition-api-client/models/person_with_gender.rb +206 -0
  92. data/lib/cloudmersive-image-recognition-api-client/models/polygon_point.rb +196 -0
  93. data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +196 -0
  94. data/lib/cloudmersive-image-recognition-api-client/models/text_detection_result.rb +208 -0
  95. data/lib/cloudmersive-image-recognition-api-client/models/text_item.rb +216 -0
  96. data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +208 -0
  97. data/lib/cloudmersive-image-recognition-api-client/version.rb +15 -0
  98. data/spec/api/artistic_api_spec.rb +48 -0
  99. data/spec/api/convert_api_spec.rb +120 -0
  100. data/spec/api/edit_api_spec.rb +191 -0
  101. data/spec/api/face_api_spec.rb +120 -0
  102. data/spec/api/filter_api_spec.rb +141 -0
  103. data/spec/api/info_api_spec.rb +59 -0
  104. data/spec/api/nsfw_api_spec.rb +47 -0
  105. data/spec/api/recognize_api_spec.rb +133 -0
  106. data/spec/api/resize_api_spec.rb +63 -0
  107. data/spec/api_client_spec.rb +243 -0
  108. data/spec/configuration_spec.rb +42 -0
  109. data/spec/models/age_detection_result_spec.rb +53 -0
  110. data/spec/models/color_result_spec.rb +53 -0
  111. data/spec/models/detected_license_plate_spec.rb +77 -0
  112. data/spec/models/detected_object_spec.rb +71 -0
  113. data/spec/models/dominant_color_result_spec.rb +47 -0
  114. data/spec/models/draw_polygon_instance_spec.rb +59 -0
  115. data/spec/models/draw_polygon_request_spec.rb +53 -0
  116. data/spec/models/draw_rectangle_instance_spec.rb +77 -0
  117. data/spec/models/draw_rectangle_request_spec.rb +53 -0
  118. data/spec/models/draw_text_instance_spec.rb +83 -0
  119. data/spec/models/draw_text_request_spec.rb +53 -0
  120. data/spec/models/face_compare_response_spec.rb +59 -0
  121. data/spec/models/face_locate_response_spec.rb +59 -0
  122. data/spec/models/face_locate_with_landmarks_response_spec.rb +59 -0
  123. data/spec/models/face_match_spec.rb +71 -0
  124. data/spec/models/face_point_spec.rb +47 -0
  125. data/spec/models/face_spec.rb +59 -0
  126. data/spec/models/face_with_landmarks_spec.rb +113 -0
  127. data/spec/models/find_symbol_result_spec.rb +71 -0
  128. data/spec/models/fine_text_detection_result_spec.rb +53 -0
  129. data/spec/models/fine_text_item_spec.rb +101 -0
  130. data/spec/models/gender_detection_result_spec.rb +53 -0
  131. data/spec/models/image_description_response_spec.rb +59 -0
  132. data/spec/models/image_metadata_exif_value_spec.rb +53 -0
  133. data/spec/models/image_metadata_spec.rb +95 -0
  134. data/spec/models/nsfw_result_spec.rb +53 -0
  135. data/spec/models/object_detection_result_spec.rb +53 -0
  136. data/spec/models/person_with_age_spec.rb +59 -0
  137. data/spec/models/person_with_gender_spec.rb +53 -0
  138. data/spec/models/polygon_point_spec.rb +47 -0
  139. data/spec/models/recognition_outcome_spec.rb +47 -0
  140. data/spec/models/text_detection_result_spec.rb +53 -0
  141. data/spec/models/text_item_spec.rb +59 -0
  142. data/spec/models/vehicle_license_plate_detection_result_spec.rb +53 -0
  143. data/spec/spec_helper.rb +111 -0
  144. metadata +145 -3
@@ -0,0 +1,14 @@
1
+ # CloudmersiveImageRecognitionApiClient::DetectedLicensePlate
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **license_plate_text_best_match** | **String** | Text from the license plate, highest-confidence result | [optional]
7
+ **license_plate_text_runner_up** | **String** | Alternate text from the license plate, based on second-highest-confidence result | [optional]
8
+ **location_x** | **Integer** | X location of the left edge of the license plate, starting from the left edge of the photo (X = 0) | [optional]
9
+ **location_y** | **Integer** | Y location of the top edge of the license plate, starting from the top edge of the photo (Y = 0) | [optional]
10
+ **width** | **Integer** | Width of the license plate's location in pixels | [optional]
11
+ **height** | **Integer** | Height of the license plate's location in pixels | [optional]
12
+ **license_plate_recognition_confidence_level** | **Float** | Confidence score on a range of 0.0 - 1.0 of the accuracy of the detected license plate, with higher scores being better; values about 0.75 are high confidence | [optional]
13
+
14
+
@@ -0,0 +1,13 @@
1
+ # CloudmersiveImageRecognitionApiClient::DetectedObject
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **object_class_name** | **String** | Class of the object. Example values are \"person\", \"car\", \"dining table\", etc. | [optional]
7
+ **height** | **Integer** | Height, in pixels, of the object | [optional]
8
+ **width** | **Integer** | Width, in pixels, of the object | [optional]
9
+ **score** | **Float** | Confidence score of detected object; possible values are between 0.0 and 1.0; values closer to 1.0 are higher confidence | [optional]
10
+ **x** | **Integer** | X location, in pixels, of the left side location of the object, with the right side being X + Width | [optional]
11
+ **y** | **Integer** | Y location, in pixels, of the top side location of the object, with the bottom side being Y + Height | [optional]
12
+
13
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveImageRecognitionApiClient::DominantColorResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
7
+ **dominant_colors** | [**Array<ColorResult>**](ColorResult.md) | Dominant colors in the image, in order where most dominant color is in the first index position (0), the second most-dominant color is in index position 1 and so on | [optional]
8
+
9
+
@@ -0,0 +1,11 @@
1
+ # CloudmersiveImageRecognitionApiClient::DrawPolygonInstance
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **border_color** | **String** | Border Color to use - can be a hex value (with #) or HTML common color name. Transparent colors are supported. | [optional]
7
+ **border_width** | **Float** | Width in pixels of the border. Pass in 0 to draw a polygon with no border | [optional]
8
+ **fill_color** | **String** | Fill Color to use - can be a hex value (with #) or HTML common color name. Transparent colors are supported. Leave blank to not fill the polygon. | [optional]
9
+ **points** | [**Array<PolygonPoint>**](PolygonPoint.md) | Points (vertices) which comprise the polygon; valid polygons must have at least 3 points | [optional]
10
+
11
+
@@ -0,0 +1,10 @@
1
+ # CloudmersiveImageRecognitionApiClient::DrawPolygonRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **base_image_bytes** | **String** | Image to draw polygons on, in bytes. You can also use the BaseImageUrl instead to supply image input as a URL | [optional]
7
+ **base_image_url** | **String** | Image to draw polygons on, as an HTTP or HTTPS fully-qualified URL | [optional]
8
+ **polygons_to_draw** | [**Array<DrawPolygonInstance>**](DrawPolygonInstance.md) | Polygons to draw on the image. Polygons are drawn in index order. | [optional]
9
+
10
+
@@ -0,0 +1,14 @@
1
+ # CloudmersiveImageRecognitionApiClient::DrawRectangleInstance
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **border_color** | **String** | Border Color to use - can be a hex value (with #) or HTML common color name. Transparent colors are supported. | [optional]
7
+ **border_width** | **Float** | Width in pixels of the border. Pass in 0 to draw a rectangle with no border | [optional]
8
+ **fill_color** | **String** | Fill Color to use - can be a hex value (with #) or HTML common color name. Transparent colors are supported. Leave blank to not fill the rectangle. | [optional]
9
+ **x** | **Float** | Pixel location of the left edge of the rectangle location | [optional]
10
+ **y** | **Float** | Pixel location of the top edge of the rectangle location | [optional]
11
+ **width** | **Float** | Width in pixels of the rectangle | [optional]
12
+ **height** | **Float** | Height in pixels of the rectangle | [optional]
13
+
14
+
@@ -0,0 +1,10 @@
1
+ # CloudmersiveImageRecognitionApiClient::DrawRectangleRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **base_image_bytes** | **String** | Image to draw rectangles on, in bytes. You can also use the BaseImageUrl instead to supply image input as a URL | [optional]
7
+ **base_image_url** | **String** | Image to draw rectangles on, as an HTTP or HTTPS fully-qualified URL | [optional]
8
+ **rectangles_to_draw** | [**Array<DrawRectangleInstance>**](DrawRectangleInstance.md) | Rectangles to draw on the image. Rectangles are drawn in index order. | [optional]
9
+
10
+
@@ -0,0 +1,15 @@
1
+ # CloudmersiveImageRecognitionApiClient::DrawTextInstance
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **text** | **String** | Text string to draw | [optional]
7
+ **font_family_name** | **String** | Font Family to use. Leave blank to default to \"Arial\". Supported fonts including Arial, Calibri, Cambria, Candara, Consolas, Constantia, Corbel, Courier New, Courier Regular, Georgia, Impact Regular, Lucida, Modern Regular, Tahoma, Times New Roman, Verdana | [optional]
8
+ **font_size** | **Float** | Font size to use. | [optional]
9
+ **color** | **String** | Color to use - can be a hex value (with #) or HTML common color name | [optional]
10
+ **x** | **Float** | Pixel location of the left edge of the text location | [optional]
11
+ **y** | **Float** | Pixel location of the top edge of the text location | [optional]
12
+ **width** | **Float** | Width in pixels of the text box to draw the text in; text will wrap inside this box | [optional]
13
+ **height** | **Float** | Height in pixels of the text box to draw the text in; text will wrap inside this box | [optional]
14
+
15
+
@@ -0,0 +1,10 @@
1
+ # CloudmersiveImageRecognitionApiClient::DrawTextRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **base_image_bytes** | **String** | Image to draw text on, in bytes. You can also use the BaseImageUrl instead to supply image input as a URL | [optional]
7
+ **base_image_url** | **String** | Image to draw text on, as an HTTP or HTTPS fully-qualified URL | [optional]
8
+ **text_to_draw** | [**Array<DrawTextInstance>**](DrawTextInstance.md) | One or more pieces of text to draw onto the image | [optional]
9
+
10
+
@@ -0,0 +1,704 @@
1
+ # CloudmersiveImageRecognitionApiClient::EditApi
2
+
3
+ All URIs are relative to *https://api.cloudmersive.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**edit_auto_orient**](EditApi.md#edit_auto_orient) | **POST** /image/edit/auto-orient/remove-exif | Normalizes image rotation and removes EXIF rotation data
8
+ [**edit_composite_basic**](EditApi.md#edit_composite_basic) | **POST** /image/edit/composite/{location} | Composite two images together
9
+ [**edit_contrast_adaptive**](EditApi.md#edit_contrast_adaptive) | **POST** /image/edit/contrast/{gamma}/adaptive | Adaptively adjust the contrast of the image to be more appealing and easy to see
10
+ [**edit_crop_rectangle**](EditApi.md#edit_crop_rectangle) | **POST** /image/edit/crop/rectangle/{left}/{top}/{width}/{height} | Crop an image to a rectangular area
11
+ [**edit_draw_polygon**](EditApi.md#edit_draw_polygon) | **POST** /image/edit/draw/polygon | Draw a polygon onto an image
12
+ [**edit_draw_rectangle**](EditApi.md#edit_draw_rectangle) | **POST** /image/edit/draw/rectangle | Draw a rectangle onto an image
13
+ [**edit_draw_text**](EditApi.md#edit_draw_text) | **POST** /image/edit/draw/text | Draw text onto an image
14
+ [**edit_drop_shadow**](EditApi.md#edit_drop_shadow) | **POST** /image/edit/drop-shadow/{X}/{Y}/{sigma}/{opacity} | Add a customizeable drop shadow to an image
15
+ [**edit_invert**](EditApi.md#edit_invert) | **POST** /image/edit/invert | Invert, negate the colors in the image
16
+ [**edit_remove_exif_data**](EditApi.md#edit_remove_exif_data) | **POST** /image/edit/remove-exif | Remove EXIF data from the image
17
+ [**edit_remove_transparency**](EditApi.md#edit_remove_transparency) | **POST** /image/edit/remove-transparency | Remove transparency from the image
18
+ [**edit_rotate**](EditApi.md#edit_rotate) | **POST** /image/edit/rotate/{degrees}/angle | Rotate an image any number of degrees
19
+
20
+
21
+ # **edit_auto_orient**
22
+ > String edit_auto_orient(image_file)
23
+
24
+ Normalizes image rotation and removes EXIF rotation data
25
+
26
+ 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
+ ### Example
29
+ ```ruby
30
+ # load the gem
31
+ require 'cloudmersive-image-recognition-api-client'
32
+ # setup authorization
33
+ CloudmersiveImageRecognitionApiClient.configure do |config|
34
+ # Configure API key authorization: Apikey
35
+ config.api_key['Apikey'] = 'YOUR API KEY'
36
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
37
+ #config.api_key_prefix['Apikey'] = 'Bearer'
38
+ end
39
+
40
+ api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
41
+
42
+ image_file = File.new('/path/to/file.txt') # File | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
43
+
44
+
45
+ begin
46
+ #Normalizes image rotation and removes EXIF rotation data
47
+ result = api_instance.edit_auto_orient(image_file)
48
+ p result
49
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
50
+ puts "Exception when calling EditApi->edit_auto_orient: #{e}"
51
+ end
52
+ ```
53
+
54
+ ### Parameters
55
+
56
+ Name | Type | Description | Notes
57
+ ------------- | ------------- | ------------- | -------------
58
+ **image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
59
+
60
+ ### Return type
61
+
62
+ **String**
63
+
64
+ ### Authorization
65
+
66
+ [Apikey](../README.md#Apikey)
67
+
68
+ ### HTTP request headers
69
+
70
+ - **Content-Type**: multipart/form-data
71
+ - **Accept**: application/octet-stream
72
+
73
+
74
+
75
+ # **edit_composite_basic**
76
+ > String edit_composite_basic(location, base_image, layered_image)
77
+
78
+ Composite two images together
79
+
80
+ 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
+
82
+ ### Example
83
+ ```ruby
84
+ # load the gem
85
+ require 'cloudmersive-image-recognition-api-client'
86
+ # setup authorization
87
+ CloudmersiveImageRecognitionApiClient.configure do |config|
88
+ # Configure API key authorization: Apikey
89
+ config.api_key['Apikey'] = 'YOUR API KEY'
90
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
91
+ #config.api_key_prefix['Apikey'] = 'Bearer'
92
+ end
93
+
94
+ api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
95
+
96
+ location = 'location_example' # String | 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\"
97
+
98
+ base_image = File.new('/path/to/file.txt') # File | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
99
+
100
+ layered_image = File.new('/path/to/file.txt') # File | Image to layer on top of the base image.
101
+
102
+
103
+ begin
104
+ #Composite two images together
105
+ result = api_instance.edit_composite_basic(location, base_image, layered_image)
106
+ p result
107
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
108
+ puts "Exception when calling EditApi->edit_composite_basic: #{e}"
109
+ end
110
+ ```
111
+
112
+ ### Parameters
113
+
114
+ Name | Type | Description | Notes
115
+ ------------- | ------------- | ------------- | -------------
116
+ **location** | **String**| 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\" |
117
+ **base_image** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
118
+ **layered_image** | **File**| Image to layer on top of the base image. |
119
+
120
+ ### Return type
121
+
122
+ **String**
123
+
124
+ ### Authorization
125
+
126
+ [Apikey](../README.md#Apikey)
127
+
128
+ ### HTTP request headers
129
+
130
+ - **Content-Type**: multipart/form-data
131
+ - **Accept**: application/octet-stream
132
+
133
+
134
+
135
+ # **edit_contrast_adaptive**
136
+ > String edit_contrast_adaptive(gamma, image_file)
137
+
138
+ Adaptively adjust the contrast of the image to be more appealing and easy to see
139
+
140
+ 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.
141
+
142
+ ### Example
143
+ ```ruby
144
+ # load the gem
145
+ require 'cloudmersive-image-recognition-api-client'
146
+ # setup authorization
147
+ CloudmersiveImageRecognitionApiClient.configure do |config|
148
+ # Configure API key authorization: Apikey
149
+ config.api_key['Apikey'] = 'YOUR API KEY'
150
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
151
+ #config.api_key_prefix['Apikey'] = 'Bearer'
152
+ end
153
+
154
+ api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
155
+
156
+ gamma = 1.2 # Float | 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.
157
+
158
+ image_file = File.new('/path/to/file.txt') # File | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
159
+
160
+
161
+ begin
162
+ #Adaptively adjust the contrast of the image to be more appealing and easy to see
163
+ result = api_instance.edit_contrast_adaptive(gamma, image_file)
164
+ p result
165
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
166
+ puts "Exception when calling EditApi->edit_contrast_adaptive: #{e}"
167
+ end
168
+ ```
169
+
170
+ ### Parameters
171
+
172
+ Name | Type | Description | Notes
173
+ ------------- | ------------- | ------------- | -------------
174
+ **gamma** | **Float**| 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. |
175
+ **image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
176
+
177
+ ### Return type
178
+
179
+ **String**
180
+
181
+ ### Authorization
182
+
183
+ [Apikey](../README.md#Apikey)
184
+
185
+ ### HTTP request headers
186
+
187
+ - **Content-Type**: multipart/form-data
188
+ - **Accept**: application/octet-stream
189
+
190
+
191
+
192
+ # **edit_crop_rectangle**
193
+ > String edit_crop_rectangle(left, top, width, height, image_file)
194
+
195
+ Crop an image to a rectangular area
196
+
197
+ Crop an image to a target rectangular area
198
+
199
+ ### Example
200
+ ```ruby
201
+ # load the gem
202
+ require 'cloudmersive-image-recognition-api-client'
203
+ # setup authorization
204
+ CloudmersiveImageRecognitionApiClient.configure do |config|
205
+ # Configure API key authorization: Apikey
206
+ config.api_key['Apikey'] = 'YOUR API KEY'
207
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
208
+ #config.api_key_prefix['Apikey'] = 'Bearer'
209
+ end
210
+
211
+ api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
212
+
213
+ left = 56 # Integer | The left edge of the rectangular crop area in pixels (X).
214
+
215
+ top = 56 # Integer | The top edge of the rectangular crop area in pixels (Y).
216
+
217
+ width = 56 # Integer | The width of the rectangular crop area in pixels.
218
+
219
+ height = 56 # Integer | The height of the rectangular crop area in pixels.
220
+
221
+ image_file = File.new('/path/to/file.txt') # File | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
222
+
223
+
224
+ begin
225
+ #Crop an image to a rectangular area
226
+ result = api_instance.edit_crop_rectangle(left, top, width, height, image_file)
227
+ p result
228
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
229
+ puts "Exception when calling EditApi->edit_crop_rectangle: #{e}"
230
+ end
231
+ ```
232
+
233
+ ### Parameters
234
+
235
+ Name | Type | Description | Notes
236
+ ------------- | ------------- | ------------- | -------------
237
+ **left** | **Integer**| The left edge of the rectangular crop area in pixels (X). |
238
+ **top** | **Integer**| The top edge of the rectangular crop area in pixels (Y). |
239
+ **width** | **Integer**| The width of the rectangular crop area in pixels. |
240
+ **height** | **Integer**| The height of the rectangular crop area in pixels. |
241
+ **image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
242
+
243
+ ### Return type
244
+
245
+ **String**
246
+
247
+ ### Authorization
248
+
249
+ [Apikey](../README.md#Apikey)
250
+
251
+ ### HTTP request headers
252
+
253
+ - **Content-Type**: multipart/form-data
254
+ - **Accept**: application/octet-stream
255
+
256
+
257
+
258
+ # **edit_draw_polygon**
259
+ > String edit_draw_polygon(request)
260
+
261
+ Draw a polygon onto an image
262
+
263
+ Draw one or more polygons, with customized visuals, onto an image
264
+
265
+ ### Example
266
+ ```ruby
267
+ # load the gem
268
+ require 'cloudmersive-image-recognition-api-client'
269
+ # setup authorization
270
+ CloudmersiveImageRecognitionApiClient.configure do |config|
271
+ # Configure API key authorization: Apikey
272
+ config.api_key['Apikey'] = 'YOUR API KEY'
273
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
274
+ #config.api_key_prefix['Apikey'] = 'Bearer'
275
+ end
276
+
277
+ api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
278
+
279
+ request = CloudmersiveImageRecognitionApiClient::DrawPolygonRequest.new # DrawPolygonRequest | Polygon drawing request parameters
280
+
281
+
282
+ begin
283
+ #Draw a polygon onto an image
284
+ result = api_instance.edit_draw_polygon(request)
285
+ p result
286
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
287
+ puts "Exception when calling EditApi->edit_draw_polygon: #{e}"
288
+ end
289
+ ```
290
+
291
+ ### Parameters
292
+
293
+ Name | Type | Description | Notes
294
+ ------------- | ------------- | ------------- | -------------
295
+ **request** | [**DrawPolygonRequest**](DrawPolygonRequest.md)| Polygon drawing request parameters |
296
+
297
+ ### Return type
298
+
299
+ **String**
300
+
301
+ ### Authorization
302
+
303
+ [Apikey](../README.md#Apikey)
304
+
305
+ ### HTTP request headers
306
+
307
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
308
+ - **Accept**: application/octet-stream
309
+
310
+
311
+
312
+ # **edit_draw_rectangle**
313
+ > String edit_draw_rectangle(request)
314
+
315
+ Draw a rectangle onto an image
316
+
317
+ Draw one or more rectangles, with customized visuals, onto an image
318
+
319
+ ### Example
320
+ ```ruby
321
+ # load the gem
322
+ require 'cloudmersive-image-recognition-api-client'
323
+ # setup authorization
324
+ CloudmersiveImageRecognitionApiClient.configure do |config|
325
+ # Configure API key authorization: Apikey
326
+ config.api_key['Apikey'] = 'YOUR API KEY'
327
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
328
+ #config.api_key_prefix['Apikey'] = 'Bearer'
329
+ end
330
+
331
+ api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
332
+
333
+ request = CloudmersiveImageRecognitionApiClient::DrawRectangleRequest.new # DrawRectangleRequest | Draw rectangle parameters
334
+
335
+
336
+ begin
337
+ #Draw a rectangle onto an image
338
+ result = api_instance.edit_draw_rectangle(request)
339
+ p result
340
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
341
+ puts "Exception when calling EditApi->edit_draw_rectangle: #{e}"
342
+ end
343
+ ```
344
+
345
+ ### Parameters
346
+
347
+ Name | Type | Description | Notes
348
+ ------------- | ------------- | ------------- | -------------
349
+ **request** | [**DrawRectangleRequest**](DrawRectangleRequest.md)| Draw rectangle parameters |
350
+
351
+ ### Return type
352
+
353
+ **String**
354
+
355
+ ### Authorization
356
+
357
+ [Apikey](../README.md#Apikey)
358
+
359
+ ### HTTP request headers
360
+
361
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
362
+ - **Accept**: application/octet-stream
363
+
364
+
365
+
366
+ # **edit_draw_text**
367
+ > String edit_draw_text(request)
368
+
369
+ Draw text onto an image
370
+
371
+ Draw one or more pieces of text, with customized visuals, onto an image
372
+
373
+ ### Example
374
+ ```ruby
375
+ # load the gem
376
+ require 'cloudmersive-image-recognition-api-client'
377
+ # setup authorization
378
+ CloudmersiveImageRecognitionApiClient.configure do |config|
379
+ # Configure API key authorization: Apikey
380
+ config.api_key['Apikey'] = 'YOUR API KEY'
381
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
382
+ #config.api_key_prefix['Apikey'] = 'Bearer'
383
+ end
384
+
385
+ api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
386
+
387
+ request = CloudmersiveImageRecognitionApiClient::DrawTextRequest.new # DrawTextRequest | Draw text parameters
388
+
389
+
390
+ begin
391
+ #Draw text onto an image
392
+ result = api_instance.edit_draw_text(request)
393
+ p result
394
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
395
+ puts "Exception when calling EditApi->edit_draw_text: #{e}"
396
+ end
397
+ ```
398
+
399
+ ### Parameters
400
+
401
+ Name | Type | Description | Notes
402
+ ------------- | ------------- | ------------- | -------------
403
+ **request** | [**DrawTextRequest**](DrawTextRequest.md)| Draw text parameters |
404
+
405
+ ### Return type
406
+
407
+ **String**
408
+
409
+ ### Authorization
410
+
411
+ [Apikey](../README.md#Apikey)
412
+
413
+ ### HTTP request headers
414
+
415
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
416
+ - **Accept**: application/octet-stream
417
+
418
+
419
+
420
+ # **edit_drop_shadow**
421
+ > String edit_drop_shadow(x, y, sigma, opacity, image_file)
422
+
423
+ Add a customizeable drop shadow to an image
424
+
425
+ Add a customizeable drop shadow to the image
426
+
427
+ ### Example
428
+ ```ruby
429
+ # load the gem
430
+ require 'cloudmersive-image-recognition-api-client'
431
+ # setup authorization
432
+ CloudmersiveImageRecognitionApiClient.configure do |config|
433
+ # Configure API key authorization: Apikey
434
+ config.api_key['Apikey'] = 'YOUR API KEY'
435
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
436
+ #config.api_key_prefix['Apikey'] = 'Bearer'
437
+ end
438
+
439
+ api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
440
+
441
+ x = 56 # Integer | Horizontal (X) offset of the drop shadow
442
+
443
+ y = 56 # Integer | Vertical (Y) offset of the drop shadow
444
+
445
+ sigma = 56 # Integer | Sigma (blur distance) of the drop shadow
446
+
447
+ opacity = 56 # Integer | Opacity of the drop shadow; 0 is 0% and 100 is 100%
448
+
449
+ image_file = File.new('/path/to/file.txt') # File | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
450
+
451
+
452
+ begin
453
+ #Add a customizeable drop shadow to an image
454
+ result = api_instance.edit_drop_shadow(x, y, sigma, opacity, image_file)
455
+ p result
456
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
457
+ puts "Exception when calling EditApi->edit_drop_shadow: #{e}"
458
+ end
459
+ ```
460
+
461
+ ### Parameters
462
+
463
+ Name | Type | Description | Notes
464
+ ------------- | ------------- | ------------- | -------------
465
+ **x** | **Integer**| Horizontal (X) offset of the drop shadow |
466
+ **y** | **Integer**| Vertical (Y) offset of the drop shadow |
467
+ **sigma** | **Integer**| Sigma (blur distance) of the drop shadow |
468
+ **opacity** | **Integer**| Opacity of the drop shadow; 0 is 0% and 100 is 100% |
469
+ **image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
470
+
471
+ ### Return type
472
+
473
+ **String**
474
+
475
+ ### Authorization
476
+
477
+ [Apikey](../README.md#Apikey)
478
+
479
+ ### HTTP request headers
480
+
481
+ - **Content-Type**: multipart/form-data
482
+ - **Accept**: application/octet-stream
483
+
484
+
485
+
486
+ # **edit_invert**
487
+ > String edit_invert(image_file)
488
+
489
+ Invert, negate the colors in the image
490
+
491
+ 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.
492
+
493
+ ### Example
494
+ ```ruby
495
+ # load the gem
496
+ require 'cloudmersive-image-recognition-api-client'
497
+ # setup authorization
498
+ CloudmersiveImageRecognitionApiClient.configure do |config|
499
+ # Configure API key authorization: Apikey
500
+ config.api_key['Apikey'] = 'YOUR API KEY'
501
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
502
+ #config.api_key_prefix['Apikey'] = 'Bearer'
503
+ end
504
+
505
+ api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
506
+
507
+ image_file = File.new('/path/to/file.txt') # File | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
508
+
509
+
510
+ begin
511
+ #Invert, negate the colors in the image
512
+ result = api_instance.edit_invert(image_file)
513
+ p result
514
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
515
+ puts "Exception when calling EditApi->edit_invert: #{e}"
516
+ end
517
+ ```
518
+
519
+ ### Parameters
520
+
521
+ Name | Type | Description | Notes
522
+ ------------- | ------------- | ------------- | -------------
523
+ **image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
524
+
525
+ ### Return type
526
+
527
+ **String**
528
+
529
+ ### Authorization
530
+
531
+ [Apikey](../README.md#Apikey)
532
+
533
+ ### HTTP request headers
534
+
535
+ - **Content-Type**: multipart/form-data
536
+ - **Accept**: application/octet-stream
537
+
538
+
539
+
540
+ # **edit_remove_exif_data**
541
+ > String edit_remove_exif_data(image_file)
542
+
543
+ Remove EXIF data from the image
544
+
545
+ Removes any EXIF data and profiles .
546
+
547
+ ### Example
548
+ ```ruby
549
+ # load the gem
550
+ require 'cloudmersive-image-recognition-api-client'
551
+ # setup authorization
552
+ CloudmersiveImageRecognitionApiClient.configure do |config|
553
+ # Configure API key authorization: Apikey
554
+ config.api_key['Apikey'] = 'YOUR API KEY'
555
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
556
+ #config.api_key_prefix['Apikey'] = 'Bearer'
557
+ end
558
+
559
+ api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
560
+
561
+ image_file = File.new('/path/to/file.txt') # File | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
562
+
563
+
564
+ begin
565
+ #Remove EXIF data from the image
566
+ result = api_instance.edit_remove_exif_data(image_file)
567
+ p result
568
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
569
+ puts "Exception when calling EditApi->edit_remove_exif_data: #{e}"
570
+ end
571
+ ```
572
+
573
+ ### Parameters
574
+
575
+ Name | Type | Description | Notes
576
+ ------------- | ------------- | ------------- | -------------
577
+ **image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
578
+
579
+ ### Return type
580
+
581
+ **String**
582
+
583
+ ### Authorization
584
+
585
+ [Apikey](../README.md#Apikey)
586
+
587
+ ### HTTP request headers
588
+
589
+ - **Content-Type**: multipart/form-data
590
+ - **Accept**: application/octet-stream
591
+
592
+
593
+
594
+ # **edit_remove_transparency**
595
+ > String edit_remove_transparency(image_file)
596
+
597
+ Remove transparency from the image
598
+
599
+ 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.
600
+
601
+ ### Example
602
+ ```ruby
603
+ # load the gem
604
+ require 'cloudmersive-image-recognition-api-client'
605
+ # setup authorization
606
+ CloudmersiveImageRecognitionApiClient.configure do |config|
607
+ # Configure API key authorization: Apikey
608
+ config.api_key['Apikey'] = 'YOUR API KEY'
609
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
610
+ #config.api_key_prefix['Apikey'] = 'Bearer'
611
+ end
612
+
613
+ api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
614
+
615
+ image_file = File.new('/path/to/file.txt') # File | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
616
+
617
+
618
+ begin
619
+ #Remove transparency from the image
620
+ result = api_instance.edit_remove_transparency(image_file)
621
+ p result
622
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
623
+ puts "Exception when calling EditApi->edit_remove_transparency: #{e}"
624
+ end
625
+ ```
626
+
627
+ ### Parameters
628
+
629
+ Name | Type | Description | Notes
630
+ ------------- | ------------- | ------------- | -------------
631
+ **image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
632
+
633
+ ### Return type
634
+
635
+ **String**
636
+
637
+ ### Authorization
638
+
639
+ [Apikey](../README.md#Apikey)
640
+
641
+ ### HTTP request headers
642
+
643
+ - **Content-Type**: multipart/form-data
644
+ - **Accept**: application/octet-stream
645
+
646
+
647
+
648
+ # **edit_rotate**
649
+ > String edit_rotate(degrees, image_file)
650
+
651
+ Rotate an image any number of degrees
652
+
653
+ Rotates an image by an arbitrary number of degrees
654
+
655
+ ### Example
656
+ ```ruby
657
+ # load the gem
658
+ require 'cloudmersive-image-recognition-api-client'
659
+ # setup authorization
660
+ CloudmersiveImageRecognitionApiClient.configure do |config|
661
+ # Configure API key authorization: Apikey
662
+ config.api_key['Apikey'] = 'YOUR API KEY'
663
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
664
+ #config.api_key_prefix['Apikey'] = 'Bearer'
665
+ end
666
+
667
+ api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
668
+
669
+ degrees = 1.2 # Float | Degrees to rotate the image; values range from 0.0 to 360.0.
670
+
671
+ image_file = File.new('/path/to/file.txt') # File | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
672
+
673
+
674
+ begin
675
+ #Rotate an image any number of degrees
676
+ result = api_instance.edit_rotate(degrees, image_file)
677
+ p result
678
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
679
+ puts "Exception when calling EditApi->edit_rotate: #{e}"
680
+ end
681
+ ```
682
+
683
+ ### Parameters
684
+
685
+ Name | Type | Description | Notes
686
+ ------------- | ------------- | ------------- | -------------
687
+ **degrees** | **Float**| Degrees to rotate the image; values range from 0.0 to 360.0. |
688
+ **image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
689
+
690
+ ### Return type
691
+
692
+ **String**
693
+
694
+ ### Authorization
695
+
696
+ [Apikey](../README.md#Apikey)
697
+
698
+ ### HTTP request headers
699
+
700
+ - **Content-Type**: multipart/form-data
701
+ - **Accept**: application/octet-stream
702
+
703
+
704
+