cloudmersive-image-recognition-api-client 1.3.4 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c298b2d4ec00a0bc4bf12c89f021c6654abfd567059447b2df09b91bdbfb2bbb
|
4
|
+
data.tar.gz: 65b0067353c8735e3e27f25660a1fc102e56b131e47cbd9beac606ae39eeb31e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e39b4602a862616b96bac8210e85d2634153975fd6b53a827fbd7710e26aead87da013e08fe74948195d92c4a39594dad8442d9aff7e29276e4af35ce5be05b3
|
7
|
+
data.tar.gz: 0d30c216ddac810540a2ca44e4bd3cd98965f520c49283cf2a3f131dc5eb3ee09cdc755ea580eb58b171cc81898ed8e225d6514a6cfdf8cfec93196b60c04e8d
|
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: 1.3.
|
10
|
+
- Package version: 1.3.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-1.3.
|
26
|
+
gem install ./cloudmersive-image-recognition-api-client-1.3.5.gem
|
27
27
|
```
|
28
|
-
(for development, run `gem install --dev ./cloudmersive-image-recognition-api-client-1.3.
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-image-recognition-api-client-1.3.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', '~> 1.3.
|
34
|
+
gem 'cloudmersive-image-recognition-api-client', '~> 1.3.5'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
@@ -86,6 +86,7 @@ All URIs are relative to *https://api.cloudmersive.com*
|
|
86
86
|
Class | Method | HTTP request | Description
|
87
87
|
------------ | ------------- | ------------- | -------------
|
88
88
|
*CloudmersiveImageRecognitionApiClient::ArtisticApi* | [**artistic_painting**](docs/ArtisticApi.md#artistic_painting) | **POST** /image/artistic/painting/{style} | Transform an image into an artistic painting automatically
|
89
|
+
*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
|
89
90
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_composite_basic**](docs/EditApi.md#edit_composite_basic) | **POST** /image/edit/composite/{location} | Composite two images together
|
90
91
|
*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
|
91
92
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_draw_rectangle**](docs/EditApi.md#edit_draw_rectangle) | **POST** /image/edit/draw/rectangle | Draw rectangle onto an image
|
data/docs/EditApi.md
CHANGED
@@ -4,12 +4,67 @@ All URIs are relative to *https://api.cloudmersive.com*
|
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
|
+
[**edit_auto_orient**](EditApi.md#edit_auto_orient) | **POST** /image/edit/auto-orient/remove-exif | Normalizes image rotation and removes EXIF rotation data
|
7
8
|
[**edit_composite_basic**](EditApi.md#edit_composite_basic) | **POST** /image/edit/composite/{location} | Composite two images together
|
8
9
|
[**edit_contrast_adaptive**](EditApi.md#edit_contrast_adaptive) | **POST** /image/edit/contrast/{gamma}/adaptive | Adaptively adjust the contrast of the image to be more appealing and easy to see
|
9
10
|
[**edit_draw_rectangle**](EditApi.md#edit_draw_rectangle) | **POST** /image/edit/draw/rectangle | Draw rectangle onto an image
|
10
11
|
[**edit_draw_text**](EditApi.md#edit_draw_text) | **POST** /image/edit/draw/text | Draw text onto an image
|
11
12
|
|
12
13
|
|
14
|
+
# **edit_auto_orient**
|
15
|
+
> String edit_auto_orient(image_file)
|
16
|
+
|
17
|
+
Normalizes image rotation and removes EXIF rotation data
|
18
|
+
|
19
|
+
Automatically orients the input image based on EXIF information and then removes the EXIF information. EXIF is an additional set of information stored in some images taken with cell phone cameras based on the orientation of the camera. By normalizing rotation and removing EXIF data these images become much easier to process.
|
20
|
+
|
21
|
+
### Example
|
22
|
+
```ruby
|
23
|
+
# load the gem
|
24
|
+
require 'cloudmersive-image-recognition-api-client'
|
25
|
+
# setup authorization
|
26
|
+
CloudmersiveImageRecognitionApiClient.configure do |config|
|
27
|
+
# Configure API key authorization: Apikey
|
28
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
29
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
30
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
31
|
+
end
|
32
|
+
|
33
|
+
api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
34
|
+
|
35
|
+
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.
|
36
|
+
|
37
|
+
|
38
|
+
begin
|
39
|
+
#Normalizes image rotation and removes EXIF rotation data
|
40
|
+
result = api_instance.edit_auto_orient(image_file)
|
41
|
+
p result
|
42
|
+
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
43
|
+
puts "Exception when calling EditApi->edit_auto_orient: #{e}"
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
### Parameters
|
48
|
+
|
49
|
+
Name | Type | Description | Notes
|
50
|
+
------------- | ------------- | ------------- | -------------
|
51
|
+
**image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
|
52
|
+
|
53
|
+
### Return type
|
54
|
+
|
55
|
+
**String**
|
56
|
+
|
57
|
+
### Authorization
|
58
|
+
|
59
|
+
[Apikey](../README.md#Apikey)
|
60
|
+
|
61
|
+
### HTTP request headers
|
62
|
+
|
63
|
+
- **Content-Type**: multipart/form-data
|
64
|
+
- **Accept**: application/octet-stream
|
65
|
+
|
66
|
+
|
67
|
+
|
13
68
|
# **edit_composite_basic**
|
14
69
|
> String edit_composite_basic(location, base_image, layered_image)
|
15
70
|
|
@@ -20,6 +20,62 @@ module CloudmersiveImageRecognitionApiClient
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
|
23
|
+
# Normalizes image rotation and removes EXIF rotation data
|
24
|
+
# Automatically orients the input image based on EXIF information and then removes the EXIF information. EXIF is an additional set of information stored in some images taken with cell phone cameras based on the orientation of the camera. By normalizing rotation and removing EXIF data these images become much easier to process.
|
25
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [String]
|
28
|
+
def edit_auto_orient(image_file, opts = {})
|
29
|
+
data, _status_code, _headers = edit_auto_orient_with_http_info(image_file, opts)
|
30
|
+
return data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Normalizes image rotation and removes EXIF rotation data
|
34
|
+
# Automatically orients the input image based on EXIF information and then removes the EXIF information. EXIF is an additional set of information stored in some images taken with cell phone cameras based on the orientation of the camera. By normalizing rotation and removing EXIF data these images become much easier to process.
|
35
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
38
|
+
def edit_auto_orient_with_http_info(image_file, opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug "Calling API: EditApi.edit_auto_orient ..."
|
41
|
+
end
|
42
|
+
# verify the required parameter 'image_file' is set
|
43
|
+
if @api_client.config.client_side_validation && image_file.nil?
|
44
|
+
fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_auto_orient"
|
45
|
+
end
|
46
|
+
# resource path
|
47
|
+
local_var_path = "/image/edit/auto-orient/remove-exif"
|
48
|
+
|
49
|
+
# query parameters
|
50
|
+
query_params = {}
|
51
|
+
|
52
|
+
# header parameters
|
53
|
+
header_params = {}
|
54
|
+
# HTTP header 'Accept' (if needed)
|
55
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
56
|
+
# HTTP header 'Content-Type'
|
57
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
58
|
+
|
59
|
+
# form parameters
|
60
|
+
form_params = {}
|
61
|
+
form_params["imageFile"] = image_file
|
62
|
+
|
63
|
+
# http body (model)
|
64
|
+
post_body = nil
|
65
|
+
auth_names = ['Apikey']
|
66
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
67
|
+
:header_params => header_params,
|
68
|
+
:query_params => query_params,
|
69
|
+
:form_params => form_params,
|
70
|
+
:body => post_body,
|
71
|
+
:auth_names => auth_names,
|
72
|
+
:return_type => 'String')
|
73
|
+
if @api_client.config.debugging
|
74
|
+
@api_client.config.logger.debug "API called: EditApi#edit_auto_orient\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
75
|
+
end
|
76
|
+
return data, status_code, headers
|
77
|
+
end
|
78
|
+
|
23
79
|
# Composite two images together
|
24
80
|
# Composites two input images together; a layered image onto a base image. The first image you input is the base image. The second image (the layered image) will be composited on top of this base image. Supports PNG transparency. To control padding you can include transparent pixels at the border(s) of your layered images as appropriate.
|
25
81
|
# @param location 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\"
|
data/spec/api/edit_api_spec.rb
CHANGED
@@ -32,6 +32,18 @@ describe 'EditApi' do
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
+
# unit tests for edit_auto_orient
|
36
|
+
# Normalizes image rotation and removes EXIF rotation data
|
37
|
+
# Automatically orients the input image based on EXIF information and then removes the EXIF information. EXIF is an additional set of information stored in some images taken with cell phone cameras based on the orientation of the camera. By normalizing rotation and removing EXIF data these images become much easier to process.
|
38
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @return [String]
|
41
|
+
describe 'edit_auto_orient test' do
|
42
|
+
it "should work" do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
35
47
|
# unit tests for edit_composite_basic
|
36
48
|
# Composite two images together
|
37
49
|
# Composites two input images together; a layered image onto a base image. The first image you input is the base image. The second image (the layered image) will be composited on top of this base image. Supports PNG transparency. To control padding you can include transparent pixels at the border(s) of your layered images as appropriate.
|