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
data/docs/ResizeApi.md
CHANGED
@@ -13,7 +13,7 @@ Method | HTTP request | Description
|
|
13
13
|
|
14
14
|
Resize an image while preserving aspect ratio
|
15
15
|
|
16
|
-
Resize an image to a maximum width and maximum height, while preserving the image's original aspect ratio
|
16
|
+
Resize an image to a maximum width and maximum height, while preserving the image's original aspect ratio. Resize is EXIF-aware.
|
17
17
|
|
18
18
|
### Example
|
19
19
|
```ruby
|
@@ -33,7 +33,7 @@ max_width = 56 # Integer | Maximum width of the output image - final image will
|
|
33
33
|
|
34
34
|
max_height = 56 # Integer | Maximum height of the output image - final image will be as large as possible while less than or equial to this height
|
35
35
|
|
36
|
-
image_file = File.new(
|
36
|
+
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.
|
37
37
|
|
38
38
|
|
39
39
|
begin
|
@@ -73,7 +73,7 @@ Name | Type | Description | Notes
|
|
73
73
|
|
74
74
|
Resize an image
|
75
75
|
|
76
|
-
Resize an image to a specific width and specific height
|
76
|
+
Resize an image to a specific width and specific height. Resize is EXIF-aware.
|
77
77
|
|
78
78
|
### Example
|
79
79
|
```ruby
|
@@ -93,7 +93,7 @@ width = 56 # Integer | Width of the output image - final image will be exactly t
|
|
93
93
|
|
94
94
|
height = 56 # Integer | Height of the output image - final image will be exactly this height
|
95
95
|
|
96
|
-
image_file = File.new(
|
96
|
+
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.
|
97
97
|
|
98
98
|
|
99
99
|
begin
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# CloudmersiveImageRecognitionApiClient::TextGenerationApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.cloudmersive.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**text_generation_create_handwriting_png**](TextGenerationApi.md#text_generation_create_handwriting_png) | **POST** /image/text/create/handwriting/png | Create an image of handwriting in PNG format
|
8
|
+
|
9
|
+
|
10
|
+
# **text_generation_create_handwriting_png**
|
11
|
+
> Object text_generation_create_handwriting_png(request)
|
12
|
+
|
13
|
+
Create an image of handwriting in PNG format
|
14
|
+
|
15
|
+
Uses Deep Learning to generate realistic handwriting and returns the result as a PNG image
|
16
|
+
|
17
|
+
### Example
|
18
|
+
```ruby
|
19
|
+
# load the gem
|
20
|
+
require 'cloudmersive-image-recognition-api-client'
|
21
|
+
# setup authorization
|
22
|
+
CloudmersiveImageRecognitionApiClient.configure do |config|
|
23
|
+
# Configure API key authorization: Apikey
|
24
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
25
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
26
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
27
|
+
end
|
28
|
+
|
29
|
+
api_instance = CloudmersiveImageRecognitionApiClient::TextGenerationApi.new
|
30
|
+
|
31
|
+
request = CloudmersiveImageRecognitionApiClient::CreateHandwritingRequest.new # CreateHandwritingRequest | Draw text parameters
|
32
|
+
|
33
|
+
|
34
|
+
begin
|
35
|
+
#Create an image of handwriting in PNG format
|
36
|
+
result = api_instance.text_generation_create_handwriting_png(request)
|
37
|
+
p result
|
38
|
+
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
39
|
+
puts "Exception when calling TextGenerationApi->text_generation_create_handwriting_png: #{e}"
|
40
|
+
end
|
41
|
+
```
|
42
|
+
|
43
|
+
### Parameters
|
44
|
+
|
45
|
+
Name | Type | Description | Notes
|
46
|
+
------------- | ------------- | ------------- | -------------
|
47
|
+
**request** | [**CreateHandwritingRequest**](CreateHandwritingRequest.md)| Draw text parameters |
|
48
|
+
|
49
|
+
### Return type
|
50
|
+
|
51
|
+
**Object**
|
52
|
+
|
53
|
+
### Authorization
|
54
|
+
|
55
|
+
[Apikey](../README.md#Apikey)
|
56
|
+
|
57
|
+
### HTTP request headers
|
58
|
+
|
59
|
+
- **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
|
60
|
+
- **Accept**: application/octet-stream
|
61
|
+
|
62
|
+
|
63
|
+
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -19,6 +19,7 @@ require 'cloudmersive-image-recognition-api-client/configuration'
|
|
19
19
|
# Models
|
20
20
|
require 'cloudmersive-image-recognition-api-client/models/age_detection_result'
|
21
21
|
require 'cloudmersive-image-recognition-api-client/models/color_result'
|
22
|
+
require 'cloudmersive-image-recognition-api-client/models/create_handwriting_request'
|
22
23
|
require 'cloudmersive-image-recognition-api-client/models/detected_license_plate'
|
23
24
|
require 'cloudmersive-image-recognition-api-client/models/detected_object'
|
24
25
|
require 'cloudmersive-image-recognition-api-client/models/dominant_color_result'
|
@@ -42,6 +43,10 @@ require 'cloudmersive-image-recognition-api-client/models/gender_detection_resul
|
|
42
43
|
require 'cloudmersive-image-recognition-api-client/models/image_description_response'
|
43
44
|
require 'cloudmersive-image-recognition-api-client/models/image_metadata'
|
44
45
|
require 'cloudmersive-image-recognition-api-client/models/image_metadata_exif_value'
|
46
|
+
require 'cloudmersive-image-recognition-api-client/models/image_similarity_comparison_response'
|
47
|
+
require 'cloudmersive-image-recognition-api-client/models/image_similarity_hash_distance_request'
|
48
|
+
require 'cloudmersive-image-recognition-api-client/models/image_similarity_hash_distance_response'
|
49
|
+
require 'cloudmersive-image-recognition-api-client/models/image_similarity_hash_response'
|
45
50
|
require 'cloudmersive-image-recognition-api-client/models/nsfw_result'
|
46
51
|
require 'cloudmersive-image-recognition-api-client/models/object_detection_result'
|
47
52
|
require 'cloudmersive-image-recognition-api-client/models/person_with_age'
|
@@ -62,6 +67,7 @@ require 'cloudmersive-image-recognition-api-client/api/info_api'
|
|
62
67
|
require 'cloudmersive-image-recognition-api-client/api/nsfw_api'
|
63
68
|
require 'cloudmersive-image-recognition-api-client/api/recognize_api'
|
64
69
|
require 'cloudmersive-image-recognition-api-client/api/resize_api'
|
70
|
+
require 'cloudmersive-image-recognition-api-client/api/text_generation_api'
|
65
71
|
|
66
72
|
module CloudmersiveImageRecognitionApiClient
|
67
73
|
class << self
|
@@ -6,11 +6,11 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
|
-
require
|
13
|
+
require 'uri'
|
14
14
|
|
15
15
|
module CloudmersiveImageRecognitionApiClient
|
16
16
|
class ArtisticApi
|
@@ -19,7 +19,6 @@ module CloudmersiveImageRecognitionApiClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
|
23
22
|
# Transform an image into an artistic painting automatically
|
24
23
|
# Uses machine learning to automatically transform an image into an artistic painting. Due to depth of AI processing, depending on image size this operation can take up to 20 seconds.
|
25
24
|
# @param style The style of the painting to apply. To start, try \"udnie\" a painting style. Possible values are: \"udnie\", \"wave\", \"la_muse\", \"rain_princess\".
|
@@ -28,7 +27,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
28
27
|
# @return [String]
|
29
28
|
def artistic_painting(style, image_file, opts = {})
|
30
29
|
data, _status_code, _headers = artistic_painting_with_http_info(style, image_file, opts)
|
31
|
-
|
30
|
+
data
|
32
31
|
end
|
33
32
|
|
34
33
|
# Transform an image into an artistic painting automatically
|
@@ -39,7 +38,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
39
38
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
40
39
|
def artistic_painting_with_http_info(style, image_file, opts = {})
|
41
40
|
if @api_client.config.debugging
|
42
|
-
@api_client.config.logger.debug
|
41
|
+
@api_client.config.logger.debug 'Calling API: ArtisticApi.artistic_painting ...'
|
43
42
|
end
|
44
43
|
# verify the required parameter 'style' is set
|
45
44
|
if @api_client.config.client_side_validation && style.nil?
|
@@ -50,7 +49,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
50
49
|
fail ArgumentError, "Missing the required parameter 'image_file' when calling ArtisticApi.artistic_painting"
|
51
50
|
end
|
52
51
|
# resource path
|
53
|
-
local_var_path =
|
52
|
+
local_var_path = '/image/artistic/painting/{style}'.sub('{' + 'style' + '}', style.to_s)
|
54
53
|
|
55
54
|
# query parameters
|
56
55
|
query_params = {}
|
@@ -64,7 +63,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
64
63
|
|
65
64
|
# form parameters
|
66
65
|
form_params = {}
|
67
|
-
form_params[
|
66
|
+
form_params['imageFile'] = image_file
|
68
67
|
|
69
68
|
# http body (model)
|
70
69
|
post_body = nil
|
@@ -6,11 +6,11 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
|
-
require
|
13
|
+
require 'uri'
|
14
14
|
|
15
15
|
module CloudmersiveImageRecognitionApiClient
|
16
16
|
class ConvertApi
|
@@ -19,7 +19,6 @@ module CloudmersiveImageRecognitionApiClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
|
23
22
|
# Convert input image to Bitmap BMP format
|
24
23
|
# Converts the input image into PSD format. Supported input file formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PDF, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV.
|
25
24
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
@@ -27,7 +26,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
27
26
|
# @return [String]
|
28
27
|
def convert_to_bmp(image_file, opts = {})
|
29
28
|
data, _status_code, _headers = convert_to_bmp_with_http_info(image_file, opts)
|
30
|
-
|
29
|
+
data
|
31
30
|
end
|
32
31
|
|
33
32
|
# Convert input image to Bitmap BMP format
|
@@ -37,14 +36,14 @@ module CloudmersiveImageRecognitionApiClient
|
|
37
36
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
38
37
|
def convert_to_bmp_with_http_info(image_file, opts = {})
|
39
38
|
if @api_client.config.debugging
|
40
|
-
@api_client.config.logger.debug
|
39
|
+
@api_client.config.logger.debug 'Calling API: ConvertApi.convert_to_bmp ...'
|
41
40
|
end
|
42
41
|
# verify the required parameter 'image_file' is set
|
43
42
|
if @api_client.config.client_side_validation && image_file.nil?
|
44
43
|
fail ArgumentError, "Missing the required parameter 'image_file' when calling ConvertApi.convert_to_bmp"
|
45
44
|
end
|
46
45
|
# resource path
|
47
|
-
local_var_path =
|
46
|
+
local_var_path = '/image/convert/to/bmp'
|
48
47
|
|
49
48
|
# query parameters
|
50
49
|
query_params = {}
|
@@ -58,7 +57,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
58
57
|
|
59
58
|
# form parameters
|
60
59
|
form_params = {}
|
61
|
-
form_params[
|
60
|
+
form_params['imageFile'] = image_file
|
62
61
|
|
63
62
|
# http body (model)
|
64
63
|
post_body = nil
|
@@ -75,7 +74,6 @@ module CloudmersiveImageRecognitionApiClient
|
|
75
74
|
end
|
76
75
|
return data, status_code, headers
|
77
76
|
end
|
78
|
-
|
79
77
|
# Convert input image to GIF format
|
80
78
|
# Converts the input image into GIF format. Supported input file formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PDF, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV.
|
81
79
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
@@ -83,7 +81,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
83
81
|
# @return [String]
|
84
82
|
def convert_to_gif(image_file, opts = {})
|
85
83
|
data, _status_code, _headers = convert_to_gif_with_http_info(image_file, opts)
|
86
|
-
|
84
|
+
data
|
87
85
|
end
|
88
86
|
|
89
87
|
# Convert input image to GIF format
|
@@ -93,14 +91,14 @@ module CloudmersiveImageRecognitionApiClient
|
|
93
91
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
94
92
|
def convert_to_gif_with_http_info(image_file, opts = {})
|
95
93
|
if @api_client.config.debugging
|
96
|
-
@api_client.config.logger.debug
|
94
|
+
@api_client.config.logger.debug 'Calling API: ConvertApi.convert_to_gif ...'
|
97
95
|
end
|
98
96
|
# verify the required parameter 'image_file' is set
|
99
97
|
if @api_client.config.client_side_validation && image_file.nil?
|
100
98
|
fail ArgumentError, "Missing the required parameter 'image_file' when calling ConvertApi.convert_to_gif"
|
101
99
|
end
|
102
100
|
# resource path
|
103
|
-
local_var_path =
|
101
|
+
local_var_path = '/image/convert/to/gif'
|
104
102
|
|
105
103
|
# query parameters
|
106
104
|
query_params = {}
|
@@ -114,7 +112,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
114
112
|
|
115
113
|
# form parameters
|
116
114
|
form_params = {}
|
117
|
-
form_params[
|
115
|
+
form_params['imageFile'] = image_file
|
118
116
|
|
119
117
|
# http body (model)
|
120
118
|
post_body = nil
|
@@ -131,7 +129,6 @@ module CloudmersiveImageRecognitionApiClient
|
|
131
129
|
end
|
132
130
|
return data, status_code, headers
|
133
131
|
end
|
134
|
-
|
135
132
|
# Convert input image to JPG, JPEG format
|
136
133
|
# Converts the input image into JPEG/JPG format. Customize encoding parameters. Supported input file formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PDF, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV.
|
137
134
|
# @param quality Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75
|
@@ -140,7 +137,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
140
137
|
# @return [String]
|
141
138
|
def convert_to_jpg(quality, image_file, opts = {})
|
142
139
|
data, _status_code, _headers = convert_to_jpg_with_http_info(quality, image_file, opts)
|
143
|
-
|
140
|
+
data
|
144
141
|
end
|
145
142
|
|
146
143
|
# Convert input image to JPG, JPEG format
|
@@ -151,7 +148,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
151
148
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
152
149
|
def convert_to_jpg_with_http_info(quality, image_file, opts = {})
|
153
150
|
if @api_client.config.debugging
|
154
|
-
@api_client.config.logger.debug
|
151
|
+
@api_client.config.logger.debug 'Calling API: ConvertApi.convert_to_jpg ...'
|
155
152
|
end
|
156
153
|
# verify the required parameter 'quality' is set
|
157
154
|
if @api_client.config.client_side_validation && quality.nil?
|
@@ -162,7 +159,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
162
159
|
fail ArgumentError, "Missing the required parameter 'image_file' when calling ConvertApi.convert_to_jpg"
|
163
160
|
end
|
164
161
|
# resource path
|
165
|
-
local_var_path =
|
162
|
+
local_var_path = '/image/convert/to/jpg/{quality}'.sub('{' + 'quality' + '}', quality.to_s)
|
166
163
|
|
167
164
|
# query parameters
|
168
165
|
query_params = {}
|
@@ -176,7 +173,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
176
173
|
|
177
174
|
# form parameters
|
178
175
|
form_params = {}
|
179
|
-
form_params[
|
176
|
+
form_params['imageFile'] = image_file
|
180
177
|
|
181
178
|
# http body (model)
|
182
179
|
post_body = nil
|
@@ -193,7 +190,6 @@ module CloudmersiveImageRecognitionApiClient
|
|
193
190
|
end
|
194
191
|
return data, status_code, headers
|
195
192
|
end
|
196
|
-
|
197
193
|
# Convert input image to Photoshop PSD format
|
198
194
|
# Converts the input image into PSD format. Supported input file formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PDF, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV.
|
199
195
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
@@ -201,7 +197,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
201
197
|
# @return [String]
|
202
198
|
def convert_to_photoshop(image_file, opts = {})
|
203
199
|
data, _status_code, _headers = convert_to_photoshop_with_http_info(image_file, opts)
|
204
|
-
|
200
|
+
data
|
205
201
|
end
|
206
202
|
|
207
203
|
# Convert input image to Photoshop PSD format
|
@@ -211,14 +207,14 @@ module CloudmersiveImageRecognitionApiClient
|
|
211
207
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
212
208
|
def convert_to_photoshop_with_http_info(image_file, opts = {})
|
213
209
|
if @api_client.config.debugging
|
214
|
-
@api_client.config.logger.debug
|
210
|
+
@api_client.config.logger.debug 'Calling API: ConvertApi.convert_to_photoshop ...'
|
215
211
|
end
|
216
212
|
# verify the required parameter 'image_file' is set
|
217
213
|
if @api_client.config.client_side_validation && image_file.nil?
|
218
214
|
fail ArgumentError, "Missing the required parameter 'image_file' when calling ConvertApi.convert_to_photoshop"
|
219
215
|
end
|
220
216
|
# resource path
|
221
|
-
local_var_path =
|
217
|
+
local_var_path = '/image/convert/to/psd'
|
222
218
|
|
223
219
|
# query parameters
|
224
220
|
query_params = {}
|
@@ -232,7 +228,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
232
228
|
|
233
229
|
# form parameters
|
234
230
|
form_params = {}
|
235
|
-
form_params[
|
231
|
+
form_params['imageFile'] = image_file
|
236
232
|
|
237
233
|
# http body (model)
|
238
234
|
post_body = nil
|
@@ -249,7 +245,6 @@ module CloudmersiveImageRecognitionApiClient
|
|
249
245
|
end
|
250
246
|
return data, status_code, headers
|
251
247
|
end
|
252
|
-
|
253
248
|
# Convert input image to PNG format
|
254
249
|
# Converts the input image into PNG format. Transparency is preserved when present. Supported input file formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PDF, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV.
|
255
250
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
@@ -257,7 +252,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
257
252
|
# @return [String]
|
258
253
|
def convert_to_png(image_file, opts = {})
|
259
254
|
data, _status_code, _headers = convert_to_png_with_http_info(image_file, opts)
|
260
|
-
|
255
|
+
data
|
261
256
|
end
|
262
257
|
|
263
258
|
# Convert input image to PNG format
|
@@ -267,14 +262,14 @@ module CloudmersiveImageRecognitionApiClient
|
|
267
262
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
268
263
|
def convert_to_png_with_http_info(image_file, opts = {})
|
269
264
|
if @api_client.config.debugging
|
270
|
-
@api_client.config.logger.debug
|
265
|
+
@api_client.config.logger.debug 'Calling API: ConvertApi.convert_to_png ...'
|
271
266
|
end
|
272
267
|
# verify the required parameter 'image_file' is set
|
273
268
|
if @api_client.config.client_side_validation && image_file.nil?
|
274
269
|
fail ArgumentError, "Missing the required parameter 'image_file' when calling ConvertApi.convert_to_png"
|
275
270
|
end
|
276
271
|
# resource path
|
277
|
-
local_var_path =
|
272
|
+
local_var_path = '/image/convert/to/png'
|
278
273
|
|
279
274
|
# query parameters
|
280
275
|
query_params = {}
|
@@ -288,7 +283,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
288
283
|
|
289
284
|
# form parameters
|
290
285
|
form_params = {}
|
291
|
-
form_params[
|
286
|
+
form_params['imageFile'] = image_file
|
292
287
|
|
293
288
|
# http body (model)
|
294
289
|
post_body = nil
|
@@ -305,7 +300,6 @@ module CloudmersiveImageRecognitionApiClient
|
|
305
300
|
end
|
306
301
|
return data, status_code, headers
|
307
302
|
end
|
308
|
-
|
309
303
|
# Convert input image to TIFF format
|
310
304
|
# Converts the input image into TIFF format. Supported input file formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PDF, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV.
|
311
305
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
@@ -313,7 +307,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
313
307
|
# @return [String]
|
314
308
|
def convert_to_tiff(image_file, opts = {})
|
315
309
|
data, _status_code, _headers = convert_to_tiff_with_http_info(image_file, opts)
|
316
|
-
|
310
|
+
data
|
317
311
|
end
|
318
312
|
|
319
313
|
# Convert input image to TIFF format
|
@@ -323,14 +317,14 @@ module CloudmersiveImageRecognitionApiClient
|
|
323
317
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
324
318
|
def convert_to_tiff_with_http_info(image_file, opts = {})
|
325
319
|
if @api_client.config.debugging
|
326
|
-
@api_client.config.logger.debug
|
320
|
+
@api_client.config.logger.debug 'Calling API: ConvertApi.convert_to_tiff ...'
|
327
321
|
end
|
328
322
|
# verify the required parameter 'image_file' is set
|
329
323
|
if @api_client.config.client_side_validation && image_file.nil?
|
330
324
|
fail ArgumentError, "Missing the required parameter 'image_file' when calling ConvertApi.convert_to_tiff"
|
331
325
|
end
|
332
326
|
# resource path
|
333
|
-
local_var_path =
|
327
|
+
local_var_path = '/image/convert/to/tiff'
|
334
328
|
|
335
329
|
# query parameters
|
336
330
|
query_params = {}
|
@@ -344,7 +338,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
344
338
|
|
345
339
|
# form parameters
|
346
340
|
form_params = {}
|
347
|
-
form_params[
|
341
|
+
form_params['imageFile'] = image_file
|
348
342
|
|
349
343
|
# http body (model)
|
350
344
|
post_body = nil
|
@@ -361,7 +355,6 @@ module CloudmersiveImageRecognitionApiClient
|
|
361
355
|
end
|
362
356
|
return data, status_code, headers
|
363
357
|
end
|
364
|
-
|
365
358
|
# Convert input image to WebP format
|
366
359
|
# Converts the input image into WebP format. Supported input file formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PDF, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV.
|
367
360
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
@@ -369,7 +362,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
369
362
|
# @return [String]
|
370
363
|
def convert_to_web_p(image_file, opts = {})
|
371
364
|
data, _status_code, _headers = convert_to_web_p_with_http_info(image_file, opts)
|
372
|
-
|
365
|
+
data
|
373
366
|
end
|
374
367
|
|
375
368
|
# Convert input image to WebP format
|
@@ -379,14 +372,14 @@ module CloudmersiveImageRecognitionApiClient
|
|
379
372
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
380
373
|
def convert_to_web_p_with_http_info(image_file, opts = {})
|
381
374
|
if @api_client.config.debugging
|
382
|
-
@api_client.config.logger.debug
|
375
|
+
@api_client.config.logger.debug 'Calling API: ConvertApi.convert_to_web_p ...'
|
383
376
|
end
|
384
377
|
# verify the required parameter 'image_file' is set
|
385
378
|
if @api_client.config.client_side_validation && image_file.nil?
|
386
379
|
fail ArgumentError, "Missing the required parameter 'image_file' when calling ConvertApi.convert_to_web_p"
|
387
380
|
end
|
388
381
|
# resource path
|
389
|
-
local_var_path =
|
382
|
+
local_var_path = '/image/convert/to/webp'
|
390
383
|
|
391
384
|
# query parameters
|
392
385
|
query_params = {}
|
@@ -400,7 +393,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
400
393
|
|
401
394
|
# form parameters
|
402
395
|
form_params = {}
|
403
|
-
form_params[
|
396
|
+
form_params['imageFile'] = image_file
|
404
397
|
|
405
398
|
# http body (model)
|
406
399
|
post_body = nil
|