cloudmersive-image-recognition-api-client 1.4.5 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +12 -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 +255 -9
- data/docs/FaceApi.md +8 -8
- data/docs/FilterApi.md +8 -8
- data/docs/InfoApi.md +2 -2
- data/docs/NsfwApi.md +1 -1
- data/docs/RecognizeApi.md +11 -11
- data/docs/ResizeApi.md +4 -4
- data/docs/TextGenerationApi.md +63 -0
- data/lib/cloudmersive-image-recognition-api-client.rb +3 -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 +300 -47
- 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 +37 -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/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 +69 -11
- 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 +10 -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/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 +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c88ba84a26b95a36a2f5fa79ab829fd397e128521becfd2c327c2aeb7ca6a66e
|
4
|
+
data.tar.gz: 365759dab497fbae3626ffe13da3e8931880f5dd1705683b4056801931896096
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b532d3715ed1316177226e0690ca329c181221e693fb75ce2f47a8cc3ee430ee4e1afeafc9452219165f4fa813df44b8d91d9f442a11f1020539d755bf3c83e5
|
7
|
+
data.tar.gz: d78ad9f4461698c1fe60e29a86d838e7e576091a7e30320b66979f2338f42d8246edfe0459a256c7a4246b75712d7cab1626eef09117cfee97d47e1b76a6d8f8
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Image Recognition and Processing APIs let you use Machine Learning to recognize
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
9
|
- API version: v1
|
10
|
-
- Package version:
|
10
|
+
- Package version: 2.0.4
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
|
13
13
|
## Installation
|
@@ -23,15 +23,15 @@ gem build cloudmersive-image-recognition-api-client.gemspec
|
|
23
23
|
Then either install the gem locally:
|
24
24
|
|
25
25
|
```shell
|
26
|
-
gem install ./cloudmersive-image-recognition-api-client-
|
26
|
+
gem install ./cloudmersive-image-recognition-api-client-2.0.4.gem
|
27
27
|
```
|
28
|
-
(for development, run `gem install --dev ./cloudmersive-image-recognition-api-client-
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-image-recognition-api-client-2.0.4.gem` to install the development dependencies)
|
29
29
|
|
30
30
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
31
|
|
32
32
|
Finally add this to the Gemfile:
|
33
33
|
|
34
|
-
gem 'cloudmersive-image-recognition-api-client', '~>
|
34
|
+
gem 'cloudmersive-image-recognition-api-client', '~> 2.0.4'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
@@ -64,9 +64,9 @@ end
|
|
64
64
|
|
65
65
|
api_instance = CloudmersiveImageRecognitionApiClient::ArtisticApi.new
|
66
66
|
|
67
|
-
style =
|
67
|
+
style = 'style_example' # String | The style of the painting to apply. To start, try \"udnie\" a painting style. Possible values are: \"udnie\", \"wave\", \"la_muse\", \"rain_princess\".
|
68
68
|
|
69
|
-
image_file = File.new(
|
69
|
+
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.
|
70
70
|
|
71
71
|
|
72
72
|
begin
|
@@ -95,12 +95,16 @@ Class | Method | HTTP request | Description
|
|
95
95
|
*CloudmersiveImageRecognitionApiClient::ConvertApi* | [**convert_to_web_p**](docs/ConvertApi.md#convert_to_web_p) | **POST** /image/convert/to/webp | Convert input image to WebP format
|
96
96
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_auto_orient**](docs/EditApi.md#edit_auto_orient) | **POST** /image/edit/auto-orient/remove-exif | Normalizes image rotation and removes EXIF rotation data
|
97
97
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_composite_basic**](docs/EditApi.md#edit_composite_basic) | **POST** /image/edit/composite/{location} | Composite two images together
|
98
|
+
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_composite_precise**](docs/EditApi.md#edit_composite_precise) | **POST** /image/edit/composite/precise | Composite two images together precisely
|
98
99
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_contrast_adaptive**](docs/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
|
100
|
+
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_crop_circle**](docs/EditApi.md#edit_crop_circle) | **POST** /image/edit/crop/circle/{left}/{top}/{radius} | Crop an image to an circular area
|
99
101
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_crop_rectangle**](docs/EditApi.md#edit_crop_rectangle) | **POST** /image/edit/crop/rectangle/{left}/{top}/{width}/{height} | Crop an image to a rectangular area
|
100
102
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_draw_polygon**](docs/EditApi.md#edit_draw_polygon) | **POST** /image/edit/draw/polygon | Draw a polygon onto an image
|
101
103
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_draw_rectangle**](docs/EditApi.md#edit_draw_rectangle) | **POST** /image/edit/draw/rectangle | Draw a rectangle onto an image
|
102
104
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_draw_text**](docs/EditApi.md#edit_draw_text) | **POST** /image/edit/draw/text | Draw text onto an image
|
103
105
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_drop_shadow**](docs/EditApi.md#edit_drop_shadow) | **POST** /image/edit/drop-shadow/{X}/{Y}/{sigma}/{opacity} | Add a customizeable drop shadow to an image
|
106
|
+
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_invert**](docs/EditApi.md#edit_invert) | **POST** /image/edit/invert | Invert, negate the colors in the image
|
107
|
+
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_remove_exif_data**](docs/EditApi.md#edit_remove_exif_data) | **POST** /image/edit/remove-exif | Remove EXIF data from the image
|
104
108
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_remove_transparency**](docs/EditApi.md#edit_remove_transparency) | **POST** /image/edit/remove-transparency | Remove transparency from the image
|
105
109
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_rotate**](docs/EditApi.md#edit_rotate) | **POST** /image/edit/rotate/{degrees}/angle | Rotate an image any number of degrees
|
106
110
|
*CloudmersiveImageRecognitionApiClient::FaceApi* | [**face_compare**](docs/FaceApi.md#face_compare) | **POST** /image/face/compare-and-match | Compare and match faces
|
@@ -131,12 +135,14 @@ Class | Method | HTTP request | Description
|
|
131
135
|
*CloudmersiveImageRecognitionApiClient::RecognizeApi* | [**recognize_find_symbol**](docs/RecognizeApi.md#recognize_find_symbol) | **POST** /image/recognize/find/symbol | Find the location of a symbol in an image
|
132
136
|
*CloudmersiveImageRecognitionApiClient::ResizeApi* | [**resize_post**](docs/ResizeApi.md#resize_post) | **POST** /image/resize/preserveAspectRatio/{maxWidth}/{maxHeight} | Resize an image while preserving aspect ratio
|
133
137
|
*CloudmersiveImageRecognitionApiClient::ResizeApi* | [**resize_resize_simple**](docs/ResizeApi.md#resize_resize_simple) | **POST** /image/resize/target/{width}/{height} | Resize an image
|
138
|
+
*CloudmersiveImageRecognitionApiClient::TextGenerationApi* | [**text_generation_create_handwriting_png**](docs/TextGenerationApi.md#text_generation_create_handwriting_png) | **POST** /image/text/create/handwriting/png | Create an image of handwriting in PNG format
|
134
139
|
|
135
140
|
|
136
141
|
## Documentation for Models
|
137
142
|
|
138
143
|
- [CloudmersiveImageRecognitionApiClient::AgeDetectionResult](docs/AgeDetectionResult.md)
|
139
144
|
- [CloudmersiveImageRecognitionApiClient::ColorResult](docs/ColorResult.md)
|
145
|
+
- [CloudmersiveImageRecognitionApiClient::CreateHandwritingRequest](docs/CreateHandwritingRequest.md)
|
140
146
|
- [CloudmersiveImageRecognitionApiClient::DetectedLicensePlate](docs/DetectedLicensePlate.md)
|
141
147
|
- [CloudmersiveImageRecognitionApiClient::DetectedObject](docs/DetectedObject.md)
|
142
148
|
- [CloudmersiveImageRecognitionApiClient::DominantColorResult](docs/DominantColorResult.md)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
|
2
|
+
|
3
3
|
=begin
|
4
4
|
#imageapi
|
5
5
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
OpenAPI spec version: v1
|
9
9
|
|
10
10
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
11
|
-
Swagger Codegen version: 2.
|
11
|
+
Swagger Codegen version: 2.4.14
|
12
12
|
|
13
13
|
=end
|
14
14
|
|
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
|
|
24
24
|
s.homepage = "https://www.cloudmersive.com/image-recognition-and-processing-api"
|
25
25
|
s.summary = "Advanced Machine Learning APIs for recognizing and processing images."
|
26
26
|
s.description = "Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, including automatic caption generation, face recognition and NSFW classification, and also perform useful image modification operations."
|
27
|
-
s.license =
|
27
|
+
s.license = 'Apache 2.0'
|
28
28
|
s.required_ruby_version = ">= 1.9"
|
29
29
|
|
30
30
|
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
data/docs/ArtisticApi.md
CHANGED
@@ -28,9 +28,9 @@ end
|
|
28
28
|
|
29
29
|
api_instance = CloudmersiveImageRecognitionApiClient::ArtisticApi.new
|
30
30
|
|
31
|
-
style =
|
31
|
+
style = 'style_example' # String | The style of the painting to apply. To start, try \"udnie\" a painting style. Possible values are: \"udnie\", \"wave\", \"la_muse\", \"rain_princess\".
|
32
32
|
|
33
|
-
image_file = File.new(
|
33
|
+
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.
|
34
34
|
|
35
35
|
|
36
36
|
begin
|
data/docs/ConvertApi.md
CHANGED
@@ -34,7 +34,7 @@ end
|
|
34
34
|
|
35
35
|
api_instance = CloudmersiveImageRecognitionApiClient::ConvertApi.new
|
36
36
|
|
37
|
-
image_file = File.new(
|
37
|
+
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.
|
38
38
|
|
39
39
|
|
40
40
|
begin
|
@@ -88,7 +88,7 @@ end
|
|
88
88
|
|
89
89
|
api_instance = CloudmersiveImageRecognitionApiClient::ConvertApi.new
|
90
90
|
|
91
|
-
image_file = File.new(
|
91
|
+
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.
|
92
92
|
|
93
93
|
|
94
94
|
begin
|
@@ -144,7 +144,7 @@ api_instance = CloudmersiveImageRecognitionApiClient::ConvertApi.new
|
|
144
144
|
|
145
145
|
quality = 56 # Integer | Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75
|
146
146
|
|
147
|
-
image_file = File.new(
|
147
|
+
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.
|
148
148
|
|
149
149
|
|
150
150
|
begin
|
@@ -199,7 +199,7 @@ end
|
|
199
199
|
|
200
200
|
api_instance = CloudmersiveImageRecognitionApiClient::ConvertApi.new
|
201
201
|
|
202
|
-
image_file = File.new(
|
202
|
+
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.
|
203
203
|
|
204
204
|
|
205
205
|
begin
|
@@ -253,7 +253,7 @@ end
|
|
253
253
|
|
254
254
|
api_instance = CloudmersiveImageRecognitionApiClient::ConvertApi.new
|
255
255
|
|
256
|
-
image_file = File.new(
|
256
|
+
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.
|
257
257
|
|
258
258
|
|
259
259
|
begin
|
@@ -307,7 +307,7 @@ end
|
|
307
307
|
|
308
308
|
api_instance = CloudmersiveImageRecognitionApiClient::ConvertApi.new
|
309
309
|
|
310
|
-
image_file = File.new(
|
310
|
+
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.
|
311
311
|
|
312
312
|
|
313
313
|
begin
|
@@ -361,7 +361,7 @@ end
|
|
361
361
|
|
362
362
|
api_instance = CloudmersiveImageRecognitionApiClient::ConvertApi.new
|
363
363
|
|
364
|
-
image_file = File.new(
|
364
|
+
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.
|
365
365
|
|
366
366
|
|
367
367
|
begin
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# CloudmersiveImageRecognitionApiClient::CreateHandwritingRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**text_input** | **String** | Text to convert to handwriting | [optional]
|
7
|
+
**target_width** | **Integer** | Desired width in pixels of the resulting image | [optional]
|
8
|
+
**stroke_width** | **Integer** | Optinoal; Width of the text stroke in pixels; default is 2 | [optional]
|
9
|
+
**color** | **String** | HTML hexadecimal color, or HTML common color name (e.g. 'black', 'red'), for the handwriting | [optional]
|
10
|
+
|
11
|
+
|
data/docs/DrawTextInstance.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**text** | **String** | Text string to draw | [optional]
|
7
|
-
**font_family_name** | **String** | Font Family to use. Leave blank to default to \"Arial\". | [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
8
|
**font_size** | **Float** | Font size to use. | [optional]
|
9
9
|
**color** | **String** | Color to use - can be a hex value (with #) or HTML common color name | [optional]
|
10
10
|
**x** | **Float** | Pixel location of the left edge of the text location | [optional]
|
data/docs/EditApi.md
CHANGED
@@ -6,12 +6,16 @@ Method | HTTP request | Description
|
|
6
6
|
------------- | ------------- | -------------
|
7
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
8
|
[**edit_composite_basic**](EditApi.md#edit_composite_basic) | **POST** /image/edit/composite/{location} | Composite two images together
|
9
|
+
[**edit_composite_precise**](EditApi.md#edit_composite_precise) | **POST** /image/edit/composite/precise | Composite two images together precisely
|
9
10
|
[**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
|
11
|
+
[**edit_crop_circle**](EditApi.md#edit_crop_circle) | **POST** /image/edit/crop/circle/{left}/{top}/{radius} | Crop an image to an circular area
|
10
12
|
[**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
13
|
[**edit_draw_polygon**](EditApi.md#edit_draw_polygon) | **POST** /image/edit/draw/polygon | Draw a polygon onto an image
|
12
14
|
[**edit_draw_rectangle**](EditApi.md#edit_draw_rectangle) | **POST** /image/edit/draw/rectangle | Draw a rectangle onto an image
|
13
15
|
[**edit_draw_text**](EditApi.md#edit_draw_text) | **POST** /image/edit/draw/text | Draw text onto an image
|
14
16
|
[**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
|
17
|
+
[**edit_invert**](EditApi.md#edit_invert) | **POST** /image/edit/invert | Invert, negate the colors in the image
|
18
|
+
[**edit_remove_exif_data**](EditApi.md#edit_remove_exif_data) | **POST** /image/edit/remove-exif | Remove EXIF data from the image
|
15
19
|
[**edit_remove_transparency**](EditApi.md#edit_remove_transparency) | **POST** /image/edit/remove-transparency | Remove transparency from the image
|
16
20
|
[**edit_rotate**](EditApi.md#edit_rotate) | **POST** /image/edit/rotate/{degrees}/angle | Rotate an image any number of degrees
|
17
21
|
|
@@ -37,7 +41,7 @@ end
|
|
37
41
|
|
38
42
|
api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
39
43
|
|
40
|
-
image_file = File.new(
|
44
|
+
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.
|
41
45
|
|
42
46
|
|
43
47
|
begin
|
@@ -91,11 +95,11 @@ end
|
|
91
95
|
|
92
96
|
api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
93
97
|
|
94
|
-
location =
|
98
|
+
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\"
|
95
99
|
|
96
|
-
base_image = File.new(
|
100
|
+
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.
|
97
101
|
|
98
|
-
layered_image = File.new(
|
102
|
+
layered_image = File.new('/path/to/file.txt') # File | Image to layer on top of the base image.
|
99
103
|
|
100
104
|
|
101
105
|
begin
|
@@ -130,6 +134,77 @@ Name | Type | Description | Notes
|
|
130
134
|
|
131
135
|
|
132
136
|
|
137
|
+
# **edit_composite_precise**
|
138
|
+
> String edit_composite_precise(base_image, layered_image, opts)
|
139
|
+
|
140
|
+
Composite two images together precisely
|
141
|
+
|
142
|
+
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.
|
143
|
+
|
144
|
+
### Example
|
145
|
+
```ruby
|
146
|
+
# load the gem
|
147
|
+
require 'cloudmersive-image-recognition-api-client'
|
148
|
+
# setup authorization
|
149
|
+
CloudmersiveImageRecognitionApiClient.configure do |config|
|
150
|
+
# Configure API key authorization: Apikey
|
151
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
152
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
153
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
154
|
+
end
|
155
|
+
|
156
|
+
api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
157
|
+
|
158
|
+
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.
|
159
|
+
|
160
|
+
layered_image = File.new('/path/to/file.txt') # File | Image to layer on top of the base image.
|
161
|
+
|
162
|
+
opts = {
|
163
|
+
top: 56, # Integer | Optional; Desired distance in pixels from the top of the base image to the top of the layered image.
|
164
|
+
bottom: 56, # Integer | Optional; Desired distance in pixels from the bottom of the base image to the bottom of the layered image.
|
165
|
+
left: 56, # Integer | Optional; Desired distance in pixels from the left side of the base image to the left side of the layered image.
|
166
|
+
right: 56, # Integer | Optional; Desired distance in pixels from the right side of the base image to the right side of the layered image.
|
167
|
+
width: 56, # Integer | Optional; Desired width of the layered image in pixels. Leave height empty or 0 to automatically scale the image proportionally.
|
168
|
+
height: 56 # Integer | Optional; Desired height of the layered image in pixels. Leave width empty or 0 to automatically scale the image proportionally.
|
169
|
+
}
|
170
|
+
|
171
|
+
begin
|
172
|
+
#Composite two images together precisely
|
173
|
+
result = api_instance.edit_composite_precise(base_image, layered_image, opts)
|
174
|
+
p result
|
175
|
+
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
176
|
+
puts "Exception when calling EditApi->edit_composite_precise: #{e}"
|
177
|
+
end
|
178
|
+
```
|
179
|
+
|
180
|
+
### Parameters
|
181
|
+
|
182
|
+
Name | Type | Description | Notes
|
183
|
+
------------- | ------------- | ------------- | -------------
|
184
|
+
**base_image** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
|
185
|
+
**layered_image** | **File**| Image to layer on top of the base image. |
|
186
|
+
**top** | **Integer**| Optional; Desired distance in pixels from the top of the base image to the top of the layered image. | [optional]
|
187
|
+
**bottom** | **Integer**| Optional; Desired distance in pixels from the bottom of the base image to the bottom of the layered image. | [optional]
|
188
|
+
**left** | **Integer**| Optional; Desired distance in pixels from the left side of the base image to the left side of the layered image. | [optional]
|
189
|
+
**right** | **Integer**| Optional; Desired distance in pixels from the right side of the base image to the right side of the layered image. | [optional]
|
190
|
+
**width** | **Integer**| Optional; Desired width of the layered image in pixels. Leave height empty or 0 to automatically scale the image proportionally. | [optional]
|
191
|
+
**height** | **Integer**| Optional; Desired height of the layered image in pixels. Leave width empty or 0 to automatically scale the image proportionally. | [optional]
|
192
|
+
|
193
|
+
### Return type
|
194
|
+
|
195
|
+
**String**
|
196
|
+
|
197
|
+
### Authorization
|
198
|
+
|
199
|
+
[Apikey](../README.md#Apikey)
|
200
|
+
|
201
|
+
### HTTP request headers
|
202
|
+
|
203
|
+
- **Content-Type**: multipart/form-data
|
204
|
+
- **Accept**: application/octet-stream
|
205
|
+
|
206
|
+
|
207
|
+
|
133
208
|
# **edit_contrast_adaptive**
|
134
209
|
> String edit_contrast_adaptive(gamma, image_file)
|
135
210
|
|
@@ -153,7 +228,7 @@ api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
|
153
228
|
|
154
229
|
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.
|
155
230
|
|
156
|
-
image_file = File.new(
|
231
|
+
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.
|
157
232
|
|
158
233
|
|
159
234
|
begin
|
@@ -187,6 +262,69 @@ Name | Type | Description | Notes
|
|
187
262
|
|
188
263
|
|
189
264
|
|
265
|
+
# **edit_crop_circle**
|
266
|
+
> String edit_crop_circle(left, top, radius, image_file)
|
267
|
+
|
268
|
+
Crop an image to an circular area
|
269
|
+
|
270
|
+
Crop an image to a target circular area
|
271
|
+
|
272
|
+
### Example
|
273
|
+
```ruby
|
274
|
+
# load the gem
|
275
|
+
require 'cloudmersive-image-recognition-api-client'
|
276
|
+
# setup authorization
|
277
|
+
CloudmersiveImageRecognitionApiClient.configure do |config|
|
278
|
+
# Configure API key authorization: Apikey
|
279
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
280
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
281
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
282
|
+
end
|
283
|
+
|
284
|
+
api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
285
|
+
|
286
|
+
left = 56 # Integer | The left edge of the circular crop area in pixels (X).
|
287
|
+
|
288
|
+
top = 56 # Integer | The top edge of the circular crop area in pixels (Y).
|
289
|
+
|
290
|
+
radius = 56 # Integer | The radius of the circular crop area in pixels.
|
291
|
+
|
292
|
+
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.
|
293
|
+
|
294
|
+
|
295
|
+
begin
|
296
|
+
#Crop an image to an circular area
|
297
|
+
result = api_instance.edit_crop_circle(left, top, radius, image_file)
|
298
|
+
p result
|
299
|
+
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
300
|
+
puts "Exception when calling EditApi->edit_crop_circle: #{e}"
|
301
|
+
end
|
302
|
+
```
|
303
|
+
|
304
|
+
### Parameters
|
305
|
+
|
306
|
+
Name | Type | Description | Notes
|
307
|
+
------------- | ------------- | ------------- | -------------
|
308
|
+
**left** | **Integer**| The left edge of the circular crop area in pixels (X). |
|
309
|
+
**top** | **Integer**| The top edge of the circular crop area in pixels (Y). |
|
310
|
+
**radius** | **Integer**| The radius of the circular crop area in pixels. |
|
311
|
+
**image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
|
312
|
+
|
313
|
+
### Return type
|
314
|
+
|
315
|
+
**String**
|
316
|
+
|
317
|
+
### Authorization
|
318
|
+
|
319
|
+
[Apikey](../README.md#Apikey)
|
320
|
+
|
321
|
+
### HTTP request headers
|
322
|
+
|
323
|
+
- **Content-Type**: multipart/form-data
|
324
|
+
- **Accept**: application/octet-stream
|
325
|
+
|
326
|
+
|
327
|
+
|
190
328
|
# **edit_crop_rectangle**
|
191
329
|
> String edit_crop_rectangle(left, top, width, height, image_file)
|
192
330
|
|
@@ -216,7 +354,7 @@ width = 56 # Integer | The width of the rectangular crop area in pixels.
|
|
216
354
|
|
217
355
|
height = 56 # Integer | The height of the rectangular crop area in pixels.
|
218
356
|
|
219
|
-
image_file = File.new(
|
357
|
+
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.
|
220
358
|
|
221
359
|
|
222
360
|
begin
|
@@ -444,7 +582,7 @@ sigma = 56 # Integer | Sigma (blur distance) of the drop shadow
|
|
444
582
|
|
445
583
|
opacity = 56 # Integer | Opacity of the drop shadow; 0 is 0% and 100 is 100%
|
446
584
|
|
447
|
-
image_file = File.new(
|
585
|
+
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.
|
448
586
|
|
449
587
|
|
450
588
|
begin
|
@@ -481,6 +619,114 @@ Name | Type | Description | Notes
|
|
481
619
|
|
482
620
|
|
483
621
|
|
622
|
+
# **edit_invert**
|
623
|
+
> String edit_invert(image_file)
|
624
|
+
|
625
|
+
Invert, negate the colors in the image
|
626
|
+
|
627
|
+
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.
|
628
|
+
|
629
|
+
### Example
|
630
|
+
```ruby
|
631
|
+
# load the gem
|
632
|
+
require 'cloudmersive-image-recognition-api-client'
|
633
|
+
# setup authorization
|
634
|
+
CloudmersiveImageRecognitionApiClient.configure do |config|
|
635
|
+
# Configure API key authorization: Apikey
|
636
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
637
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
638
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
639
|
+
end
|
640
|
+
|
641
|
+
api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
642
|
+
|
643
|
+
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.
|
644
|
+
|
645
|
+
|
646
|
+
begin
|
647
|
+
#Invert, negate the colors in the image
|
648
|
+
result = api_instance.edit_invert(image_file)
|
649
|
+
p result
|
650
|
+
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
651
|
+
puts "Exception when calling EditApi->edit_invert: #{e}"
|
652
|
+
end
|
653
|
+
```
|
654
|
+
|
655
|
+
### Parameters
|
656
|
+
|
657
|
+
Name | Type | Description | Notes
|
658
|
+
------------- | ------------- | ------------- | -------------
|
659
|
+
**image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
|
660
|
+
|
661
|
+
### Return type
|
662
|
+
|
663
|
+
**String**
|
664
|
+
|
665
|
+
### Authorization
|
666
|
+
|
667
|
+
[Apikey](../README.md#Apikey)
|
668
|
+
|
669
|
+
### HTTP request headers
|
670
|
+
|
671
|
+
- **Content-Type**: multipart/form-data
|
672
|
+
- **Accept**: application/octet-stream
|
673
|
+
|
674
|
+
|
675
|
+
|
676
|
+
# **edit_remove_exif_data**
|
677
|
+
> String edit_remove_exif_data(image_file)
|
678
|
+
|
679
|
+
Remove EXIF data from the image
|
680
|
+
|
681
|
+
Removes any EXIF data and profiles .
|
682
|
+
|
683
|
+
### Example
|
684
|
+
```ruby
|
685
|
+
# load the gem
|
686
|
+
require 'cloudmersive-image-recognition-api-client'
|
687
|
+
# setup authorization
|
688
|
+
CloudmersiveImageRecognitionApiClient.configure do |config|
|
689
|
+
# Configure API key authorization: Apikey
|
690
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
691
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
692
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
693
|
+
end
|
694
|
+
|
695
|
+
api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
696
|
+
|
697
|
+
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.
|
698
|
+
|
699
|
+
|
700
|
+
begin
|
701
|
+
#Remove EXIF data from the image
|
702
|
+
result = api_instance.edit_remove_exif_data(image_file)
|
703
|
+
p result
|
704
|
+
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
705
|
+
puts "Exception when calling EditApi->edit_remove_exif_data: #{e}"
|
706
|
+
end
|
707
|
+
```
|
708
|
+
|
709
|
+
### Parameters
|
710
|
+
|
711
|
+
Name | Type | Description | Notes
|
712
|
+
------------- | ------------- | ------------- | -------------
|
713
|
+
**image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
|
714
|
+
|
715
|
+
### Return type
|
716
|
+
|
717
|
+
**String**
|
718
|
+
|
719
|
+
### Authorization
|
720
|
+
|
721
|
+
[Apikey](../README.md#Apikey)
|
722
|
+
|
723
|
+
### HTTP request headers
|
724
|
+
|
725
|
+
- **Content-Type**: multipart/form-data
|
726
|
+
- **Accept**: application/octet-stream
|
727
|
+
|
728
|
+
|
729
|
+
|
484
730
|
# **edit_remove_transparency**
|
485
731
|
> String edit_remove_transparency(image_file)
|
486
732
|
|
@@ -502,7 +748,7 @@ end
|
|
502
748
|
|
503
749
|
api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
504
750
|
|
505
|
-
image_file = File.new(
|
751
|
+
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.
|
506
752
|
|
507
753
|
|
508
754
|
begin
|
@@ -558,7 +804,7 @@ api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
|
558
804
|
|
559
805
|
degrees = 1.2 # Float | Degrees to rotate the image; values range from 0.0 to 360.0.
|
560
806
|
|
561
|
-
image_file = File.new(
|
807
|
+
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
808
|
|
563
809
|
|
564
810
|
begin
|