cloudmersive-image-recognition-api-client 1.4.6 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +17 -6
- data/cloudmersive-image-recognition-api-client.gemspec +3 -3
- data/docs/ArtisticApi.md +2 -2
- data/docs/ConvertApi.md +7 -7
- data/docs/CreateHandwritingRequest.md +11 -0
- data/docs/DrawTextInstance.md +1 -1
- data/docs/EditApi.md +147 -11
- data/docs/FaceApi.md +8 -8
- data/docs/FilterApi.md +8 -8
- data/docs/ImageSimilarityComparisonResponse.md +10 -0
- data/docs/ImageSimilarityHashDistanceRequest.md +9 -0
- data/docs/ImageSimilarityHashDistanceResponse.md +9 -0
- data/docs/ImageSimilarityHashResponse.md +9 -0
- data/docs/InfoApi.md +2 -2
- data/docs/NsfwApi.md +1 -1
- data/docs/RecognizeApi.md +187 -11
- data/docs/ResizeApi.md +4 -4
- data/docs/TextGenerationApi.md +63 -0
- data/lib/cloudmersive-image-recognition-api-client.rb +7 -1
- data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +6 -7
- data/lib/cloudmersive-image-recognition-api-client/api/convert_api.rb +30 -37
- data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +199 -58
- data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +31 -38
- data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +34 -42
- data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +10 -12
- data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +6 -7
- data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +214 -45
- data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +14 -16
- data/lib/cloudmersive-image-recognition-api-client/api/text_generation_api.rb +77 -0
- data/lib/cloudmersive-image-recognition-api-client/api_client.rb +11 -9
- data/lib/cloudmersive-image-recognition-api-client/api_error.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/configuration.rb +2 -2
- data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/color_result.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/create_handwriting_request.rb +216 -0
- data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/detected_object.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/dominant_color_result.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_instance.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_request.rb +9 -13
- data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +9 -13
- data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +8 -11
- data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +9 -13
- data/lib/cloudmersive-image-recognition-api-client/models/face.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/face_compare_response.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/face_match.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/face_point.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/face_with_landmarks.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/find_symbol_result.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/fine_text_detection_result.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/fine_text_item.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/gender_detection_result.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/image_metadata.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/image_metadata_exif_value.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/image_similarity_comparison_response.rb +206 -0
- data/lib/cloudmersive-image-recognition-api-client/models/image_similarity_hash_distance_request.rb +196 -0
- data/lib/cloudmersive-image-recognition-api-client/models/image_similarity_hash_distance_response.rb +196 -0
- data/lib/cloudmersive-image-recognition-api-client/models/image_similarity_hash_response.rb +196 -0
- data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/object_detection_result.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/person_with_gender.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/polygon_point.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/text_detection_result.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/text_item.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +7 -10
- data/lib/cloudmersive-image-recognition-api-client/version.rb +2 -2
- data/spec/api/artistic_api_spec.rb +2 -2
- data/spec/api/convert_api_spec.rb +8 -8
- data/spec/api/edit_api_spec.rb +47 -13
- data/spec/api/face_api_spec.rb +8 -8
- data/spec/api/filter_api_spec.rb +9 -9
- data/spec/api/info_api_spec.rb +3 -3
- data/spec/api/nsfw_api_spec.rb +2 -2
- data/spec/api/recognize_api_spec.rb +49 -10
- data/spec/api/resize_api_spec.rb +5 -5
- data/spec/api/text_generation_api_spec.rb +47 -0
- data/spec/api_client_spec.rb +52 -35
- data/spec/configuration_spec.rb +9 -9
- data/spec/models/age_detection_result_spec.rb +4 -5
- data/spec/models/color_result_spec.rb +4 -5
- data/spec/models/create_handwriting_request_spec.rb +59 -0
- data/spec/models/detected_license_plate_spec.rb +8 -9
- data/spec/models/detected_object_spec.rb +7 -8
- data/spec/models/dominant_color_result_spec.rb +3 -4
- data/spec/models/draw_polygon_instance_spec.rb +5 -6
- data/spec/models/draw_polygon_request_spec.rb +4 -5
- data/spec/models/draw_rectangle_instance_spec.rb +8 -9
- data/spec/models/draw_rectangle_request_spec.rb +4 -5
- data/spec/models/draw_text_instance_spec.rb +9 -10
- data/spec/models/draw_text_request_spec.rb +4 -5
- data/spec/models/face_compare_response_spec.rb +5 -6
- data/spec/models/face_locate_response_spec.rb +5 -6
- data/spec/models/face_locate_with_landmarks_response_spec.rb +5 -6
- data/spec/models/face_match_spec.rb +7 -8
- data/spec/models/face_point_spec.rb +3 -4
- data/spec/models/face_spec.rb +5 -6
- data/spec/models/face_with_landmarks_spec.rb +14 -15
- data/spec/models/find_symbol_result_spec.rb +7 -8
- data/spec/models/fine_text_detection_result_spec.rb +4 -5
- data/spec/models/fine_text_item_spec.rb +12 -13
- data/spec/models/gender_detection_result_spec.rb +4 -5
- data/spec/models/image_description_response_spec.rb +5 -6
- data/spec/models/image_metadata_exif_value_spec.rb +4 -5
- data/spec/models/image_metadata_spec.rb +11 -12
- data/spec/models/image_similarity_comparison_response_spec.rb +53 -0
- data/spec/models/image_similarity_hash_distance_request_spec.rb +47 -0
- data/spec/models/image_similarity_hash_distance_response_spec.rb +47 -0
- data/spec/models/image_similarity_hash_response_spec.rb +47 -0
- data/spec/models/nsfw_result_spec.rb +4 -5
- data/spec/models/object_detection_result_spec.rb +4 -5
- data/spec/models/person_with_age_spec.rb +5 -6
- data/spec/models/person_with_gender_spec.rb +4 -5
- data/spec/models/polygon_point_spec.rb +3 -4
- data/spec/models/recognition_outcome_spec.rb +3 -4
- data/spec/models/text_detection_result_spec.rb +4 -5
- data/spec/models/text_item_spec.rb +5 -6
- data/spec/models/vehicle_license_plate_detection_result_spec.rb +4 -5
- data/spec/spec_helper.rb +1 -1
- metadata +20 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78aa2d52adbc4bddf05b645882451bbd96c12783f531dc58b1b3866861c70a43
|
4
|
+
data.tar.gz: 159bb4496f5cc1afbc39f544c1d47745f4dea5c44db68bc1315bac8dba51d710
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97a3e67ec05eeba5c30f7842257500a5b273395d3d36a47c14a5ce5865c1ecd55008ce3367e0ad58e9a962a100fa99b747251bbff69518a3e812ac31f1eed20b
|
7
|
+
data.tar.gz: 62380f8dad9e08b06e886f9d2ac1d7a9af8fd1bab2315a70cee4a8864462cfdf270f2d5e42c5ac649a8ec62ab7fe5342b5e181efb09c53cd6bedb9feb21ca3b1
|
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.5
|
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.5.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.5.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.5'
|
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,7 +95,9 @@ 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
|
@@ -131,14 +133,19 @@ Class | Method | HTTP request | Description
|
|
131
133
|
*CloudmersiveImageRecognitionApiClient::RecognizeApi* | [**recognize_detect_text_large**](docs/RecognizeApi.md#recognize_detect_text_large) | **POST** /image/recognize/detect-text/large | Detect large text in a photo
|
132
134
|
*CloudmersiveImageRecognitionApiClient::RecognizeApi* | [**recognize_detect_vehicle_license_plates**](docs/RecognizeApi.md#recognize_detect_vehicle_license_plates) | **POST** /image/recognize/detect-vehicle-license-plates | Detect vehicle license plates in an image
|
133
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
|
136
|
+
*CloudmersiveImageRecognitionApiClient::RecognizeApi* | [**recognize_similarity_compare**](docs/RecognizeApi.md#recognize_similarity_compare) | **POST** /image/recognize/similarity/compare | Compare two images for similarity
|
137
|
+
*CloudmersiveImageRecognitionApiClient::RecognizeApi* | [**recognize_similarity_hash**](docs/RecognizeApi.md#recognize_similarity_hash) | **POST** /image/recognize/similarity/hash | Generate a perceptual image hash
|
138
|
+
*CloudmersiveImageRecognitionApiClient::RecognizeApi* | [**recognize_similarity_hash_distance**](docs/RecognizeApi.md#recognize_similarity_hash_distance) | **POST** /image/recognize/similarity/hash/distance | Calculates the similarity between two perceptual image hashes
|
134
139
|
*CloudmersiveImageRecognitionApiClient::ResizeApi* | [**resize_post**](docs/ResizeApi.md#resize_post) | **POST** /image/resize/preserveAspectRatio/{maxWidth}/{maxHeight} | Resize an image while preserving aspect ratio
|
135
140
|
*CloudmersiveImageRecognitionApiClient::ResizeApi* | [**resize_resize_simple**](docs/ResizeApi.md#resize_resize_simple) | **POST** /image/resize/target/{width}/{height} | Resize an image
|
141
|
+
*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
|
136
142
|
|
137
143
|
|
138
144
|
## Documentation for Models
|
139
145
|
|
140
146
|
- [CloudmersiveImageRecognitionApiClient::AgeDetectionResult](docs/AgeDetectionResult.md)
|
141
147
|
- [CloudmersiveImageRecognitionApiClient::ColorResult](docs/ColorResult.md)
|
148
|
+
- [CloudmersiveImageRecognitionApiClient::CreateHandwritingRequest](docs/CreateHandwritingRequest.md)
|
142
149
|
- [CloudmersiveImageRecognitionApiClient::DetectedLicensePlate](docs/DetectedLicensePlate.md)
|
143
150
|
- [CloudmersiveImageRecognitionApiClient::DetectedObject](docs/DetectedObject.md)
|
144
151
|
- [CloudmersiveImageRecognitionApiClient::DominantColorResult](docs/DominantColorResult.md)
|
@@ -162,6 +169,10 @@ Class | Method | HTTP request | Description
|
|
162
169
|
- [CloudmersiveImageRecognitionApiClient::ImageDescriptionResponse](docs/ImageDescriptionResponse.md)
|
163
170
|
- [CloudmersiveImageRecognitionApiClient::ImageMetadata](docs/ImageMetadata.md)
|
164
171
|
- [CloudmersiveImageRecognitionApiClient::ImageMetadataExifValue](docs/ImageMetadataExifValue.md)
|
172
|
+
- [CloudmersiveImageRecognitionApiClient::ImageSimilarityComparisonResponse](docs/ImageSimilarityComparisonResponse.md)
|
173
|
+
- [CloudmersiveImageRecognitionApiClient::ImageSimilarityHashDistanceRequest](docs/ImageSimilarityHashDistanceRequest.md)
|
174
|
+
- [CloudmersiveImageRecognitionApiClient::ImageSimilarityHashDistanceResponse](docs/ImageSimilarityHashDistanceResponse.md)
|
175
|
+
- [CloudmersiveImageRecognitionApiClient::ImageSimilarityHashResponse](docs/ImageSimilarityHashResponse.md)
|
165
176
|
- [CloudmersiveImageRecognitionApiClient::NsfwResult](docs/NsfwResult.md)
|
166
177
|
- [CloudmersiveImageRecognitionApiClient::ObjectDetectionResult](docs/ObjectDetectionResult.md)
|
167
178
|
- [CloudmersiveImageRecognitionApiClient::PersonWithAge](docs/PersonWithAge.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,7 +6,9 @@ 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
|
@@ -39,7 +41,7 @@ end
|
|
39
41
|
|
40
42
|
api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
41
43
|
|
42
|
-
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.
|
43
45
|
|
44
46
|
|
45
47
|
begin
|
@@ -93,11 +95,11 @@ end
|
|
93
95
|
|
94
96
|
api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
95
97
|
|
96
|
-
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\"
|
97
99
|
|
98
|
-
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.
|
99
101
|
|
100
|
-
layered_image = File.new(
|
102
|
+
layered_image = File.new('/path/to/file.txt') # File | Image to layer on top of the base image.
|
101
103
|
|
102
104
|
|
103
105
|
begin
|
@@ -132,6 +134,77 @@ Name | Type | Description | Notes
|
|
132
134
|
|
133
135
|
|
134
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
|
+
|
135
208
|
# **edit_contrast_adaptive**
|
136
209
|
> String edit_contrast_adaptive(gamma, image_file)
|
137
210
|
|
@@ -155,7 +228,7 @@ api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
|
155
228
|
|
156
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.
|
157
230
|
|
158
|
-
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.
|
159
232
|
|
160
233
|
|
161
234
|
begin
|
@@ -189,6 +262,69 @@ Name | Type | Description | Notes
|
|
189
262
|
|
190
263
|
|
191
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
|
+
|
192
328
|
# **edit_crop_rectangle**
|
193
329
|
> String edit_crop_rectangle(left, top, width, height, image_file)
|
194
330
|
|
@@ -218,7 +354,7 @@ width = 56 # Integer | The width of the rectangular crop area in pixels.
|
|
218
354
|
|
219
355
|
height = 56 # Integer | The height of the rectangular crop area in pixels.
|
220
356
|
|
221
|
-
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.
|
222
358
|
|
223
359
|
|
224
360
|
begin
|
@@ -446,7 +582,7 @@ sigma = 56 # Integer | Sigma (blur distance) of the drop shadow
|
|
446
582
|
|
447
583
|
opacity = 56 # Integer | Opacity of the drop shadow; 0 is 0% and 100 is 100%
|
448
584
|
|
449
|
-
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.
|
450
586
|
|
451
587
|
|
452
588
|
begin
|
@@ -504,7 +640,7 @@ end
|
|
504
640
|
|
505
641
|
api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
506
642
|
|
507
|
-
image_file = File.new(
|
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.
|
508
644
|
|
509
645
|
|
510
646
|
begin
|
@@ -558,7 +694,7 @@ end
|
|
558
694
|
|
559
695
|
api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
560
696
|
|
561
|
-
image_file = File.new(
|
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.
|
562
698
|
|
563
699
|
|
564
700
|
begin
|
@@ -612,7 +748,7 @@ end
|
|
612
748
|
|
613
749
|
api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
614
750
|
|
615
|
-
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.
|
616
752
|
|
617
753
|
|
618
754
|
begin
|
@@ -668,7 +804,7 @@ api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
|
668
804
|
|
669
805
|
degrees = 1.2 # Float | Degrees to rotate the image; values range from 0.0 to 360.0.
|
670
806
|
|
671
|
-
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.
|
672
808
|
|
673
809
|
|
674
810
|
begin
|