cloudmersive-image-recognition-api-client 1.4.5 → 1.4.6
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b247c38a7fef7df22ec4b1ad1fa5c50f9b470dc85c8b5f3233c43bff7a5f1e8
|
4
|
+
data.tar.gz: 24faf2cd81c4b3cd61554625c0392969d227ac4858ddeb677fd8a14c2722f64c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88ccc83fefab647e7e52c7fa0d8c0fb72c2892be2858634ee3324d5d98cc23689841a8c90616b362ae2f39166ece4c63bb6a179701d436672641cdacfe75e6b5
|
7
|
+
data.tar.gz: e52f77867fa9caae30a2928b15d7b7478348b2280545381c376d3cc91cc64c3830b8f0447cab666b1d1467ab90c9051e9db80a70302ae82cff9c4a699656c696
|
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.4.
|
10
|
+
- Package version: 1.4.6
|
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.4.
|
26
|
+
gem install ./cloudmersive-image-recognition-api-client-1.4.6.gem
|
27
27
|
```
|
28
|
-
(for development, run `gem install --dev ./cloudmersive-image-recognition-api-client-1.4.
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-image-recognition-api-client-1.4.6.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.4.
|
34
|
+
gem 'cloudmersive-image-recognition-api-client', '~> 1.4.6'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
@@ -101,6 +101,8 @@ Class | Method | HTTP request | Description
|
|
101
101
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_draw_rectangle**](docs/EditApi.md#edit_draw_rectangle) | **POST** /image/edit/draw/rectangle | Draw a rectangle onto an image
|
102
102
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_draw_text**](docs/EditApi.md#edit_draw_text) | **POST** /image/edit/draw/text | Draw text onto an image
|
103
103
|
*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
|
104
|
+
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_invert**](docs/EditApi.md#edit_invert) | **POST** /image/edit/invert | Invert, negate the colors in the image
|
105
|
+
*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
106
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_remove_transparency**](docs/EditApi.md#edit_remove_transparency) | **POST** /image/edit/remove-transparency | Remove transparency from the image
|
105
107
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_rotate**](docs/EditApi.md#edit_rotate) | **POST** /image/edit/rotate/{degrees}/angle | Rotate an image any number of degrees
|
106
108
|
*CloudmersiveImageRecognitionApiClient::FaceApi* | [**face_compare**](docs/FaceApi.md#face_compare) | **POST** /image/face/compare-and-match | Compare and match faces
|
data/docs/EditApi.md
CHANGED
@@ -12,6 +12,8 @@ Method | HTTP request | Description
|
|
12
12
|
[**edit_draw_rectangle**](EditApi.md#edit_draw_rectangle) | **POST** /image/edit/draw/rectangle | Draw a rectangle onto an image
|
13
13
|
[**edit_draw_text**](EditApi.md#edit_draw_text) | **POST** /image/edit/draw/text | Draw text onto an image
|
14
14
|
[**edit_drop_shadow**](EditApi.md#edit_drop_shadow) | **POST** /image/edit/drop-shadow/{X}/{Y}/{sigma}/{opacity} | Add a customizeable drop shadow to an image
|
15
|
+
[**edit_invert**](EditApi.md#edit_invert) | **POST** /image/edit/invert | Invert, negate the colors in the image
|
16
|
+
[**edit_remove_exif_data**](EditApi.md#edit_remove_exif_data) | **POST** /image/edit/remove-exif | Remove EXIF data from the image
|
15
17
|
[**edit_remove_transparency**](EditApi.md#edit_remove_transparency) | **POST** /image/edit/remove-transparency | Remove transparency from the image
|
16
18
|
[**edit_rotate**](EditApi.md#edit_rotate) | **POST** /image/edit/rotate/{degrees}/angle | Rotate an image any number of degrees
|
17
19
|
|
@@ -481,6 +483,114 @@ Name | Type | Description | Notes
|
|
481
483
|
|
482
484
|
|
483
485
|
|
486
|
+
# **edit_invert**
|
487
|
+
> String edit_invert(image_file)
|
488
|
+
|
489
|
+
Invert, negate the colors in the image
|
490
|
+
|
491
|
+
Inverts (negates) all of the colors in the image. If the image contains transparency, the transparency will first be removed prior to inverting the image.
|
492
|
+
|
493
|
+
### Example
|
494
|
+
```ruby
|
495
|
+
# load the gem
|
496
|
+
require 'cloudmersive-image-recognition-api-client'
|
497
|
+
# setup authorization
|
498
|
+
CloudmersiveImageRecognitionApiClient.configure do |config|
|
499
|
+
# Configure API key authorization: Apikey
|
500
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
501
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
502
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
503
|
+
end
|
504
|
+
|
505
|
+
api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
506
|
+
|
507
|
+
image_file = File.new("/path/to/file.txt") # File | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
508
|
+
|
509
|
+
|
510
|
+
begin
|
511
|
+
#Invert, negate the colors in the image
|
512
|
+
result = api_instance.edit_invert(image_file)
|
513
|
+
p result
|
514
|
+
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
515
|
+
puts "Exception when calling EditApi->edit_invert: #{e}"
|
516
|
+
end
|
517
|
+
```
|
518
|
+
|
519
|
+
### Parameters
|
520
|
+
|
521
|
+
Name | Type | Description | Notes
|
522
|
+
------------- | ------------- | ------------- | -------------
|
523
|
+
**image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
|
524
|
+
|
525
|
+
### Return type
|
526
|
+
|
527
|
+
**String**
|
528
|
+
|
529
|
+
### Authorization
|
530
|
+
|
531
|
+
[Apikey](../README.md#Apikey)
|
532
|
+
|
533
|
+
### HTTP request headers
|
534
|
+
|
535
|
+
- **Content-Type**: multipart/form-data
|
536
|
+
- **Accept**: application/octet-stream
|
537
|
+
|
538
|
+
|
539
|
+
|
540
|
+
# **edit_remove_exif_data**
|
541
|
+
> String edit_remove_exif_data(image_file)
|
542
|
+
|
543
|
+
Remove EXIF data from the image
|
544
|
+
|
545
|
+
Removes any EXIF data and profiles .
|
546
|
+
|
547
|
+
### Example
|
548
|
+
```ruby
|
549
|
+
# load the gem
|
550
|
+
require 'cloudmersive-image-recognition-api-client'
|
551
|
+
# setup authorization
|
552
|
+
CloudmersiveImageRecognitionApiClient.configure do |config|
|
553
|
+
# Configure API key authorization: Apikey
|
554
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
555
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
556
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
557
|
+
end
|
558
|
+
|
559
|
+
api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
560
|
+
|
561
|
+
image_file = File.new("/path/to/file.txt") # File | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
562
|
+
|
563
|
+
|
564
|
+
begin
|
565
|
+
#Remove EXIF data from the image
|
566
|
+
result = api_instance.edit_remove_exif_data(image_file)
|
567
|
+
p result
|
568
|
+
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
569
|
+
puts "Exception when calling EditApi->edit_remove_exif_data: #{e}"
|
570
|
+
end
|
571
|
+
```
|
572
|
+
|
573
|
+
### Parameters
|
574
|
+
|
575
|
+
Name | Type | Description | Notes
|
576
|
+
------------- | ------------- | ------------- | -------------
|
577
|
+
**image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
|
578
|
+
|
579
|
+
### Return type
|
580
|
+
|
581
|
+
**String**
|
582
|
+
|
583
|
+
### Authorization
|
584
|
+
|
585
|
+
[Apikey](../README.md#Apikey)
|
586
|
+
|
587
|
+
### HTTP request headers
|
588
|
+
|
589
|
+
- **Content-Type**: multipart/form-data
|
590
|
+
- **Accept**: application/octet-stream
|
591
|
+
|
592
|
+
|
593
|
+
|
484
594
|
# **edit_remove_transparency**
|
485
595
|
> String edit_remove_transparency(image_file)
|
486
596
|
|
@@ -532,6 +532,118 @@ module CloudmersiveImageRecognitionApiClient
|
|
532
532
|
return data, status_code, headers
|
533
533
|
end
|
534
534
|
|
535
|
+
# Invert, negate the colors in the image
|
536
|
+
# 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.
|
537
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
538
|
+
# @param [Hash] opts the optional parameters
|
539
|
+
# @return [String]
|
540
|
+
def edit_invert(image_file, opts = {})
|
541
|
+
data, _status_code, _headers = edit_invert_with_http_info(image_file, opts)
|
542
|
+
return data
|
543
|
+
end
|
544
|
+
|
545
|
+
# Invert, negate the colors in the image
|
546
|
+
# 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.
|
547
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
548
|
+
# @param [Hash] opts the optional parameters
|
549
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
550
|
+
def edit_invert_with_http_info(image_file, opts = {})
|
551
|
+
if @api_client.config.debugging
|
552
|
+
@api_client.config.logger.debug "Calling API: EditApi.edit_invert ..."
|
553
|
+
end
|
554
|
+
# verify the required parameter 'image_file' is set
|
555
|
+
if @api_client.config.client_side_validation && image_file.nil?
|
556
|
+
fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_invert"
|
557
|
+
end
|
558
|
+
# resource path
|
559
|
+
local_var_path = "/image/edit/invert"
|
560
|
+
|
561
|
+
# query parameters
|
562
|
+
query_params = {}
|
563
|
+
|
564
|
+
# header parameters
|
565
|
+
header_params = {}
|
566
|
+
# HTTP header 'Accept' (if needed)
|
567
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
568
|
+
# HTTP header 'Content-Type'
|
569
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
570
|
+
|
571
|
+
# form parameters
|
572
|
+
form_params = {}
|
573
|
+
form_params["imageFile"] = image_file
|
574
|
+
|
575
|
+
# http body (model)
|
576
|
+
post_body = nil
|
577
|
+
auth_names = ['Apikey']
|
578
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
579
|
+
:header_params => header_params,
|
580
|
+
:query_params => query_params,
|
581
|
+
:form_params => form_params,
|
582
|
+
:body => post_body,
|
583
|
+
:auth_names => auth_names,
|
584
|
+
:return_type => 'String')
|
585
|
+
if @api_client.config.debugging
|
586
|
+
@api_client.config.logger.debug "API called: EditApi#edit_invert\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
587
|
+
end
|
588
|
+
return data, status_code, headers
|
589
|
+
end
|
590
|
+
|
591
|
+
# Remove EXIF data from the image
|
592
|
+
# Removes any EXIF data and profiles .
|
593
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
594
|
+
# @param [Hash] opts the optional parameters
|
595
|
+
# @return [String]
|
596
|
+
def edit_remove_exif_data(image_file, opts = {})
|
597
|
+
data, _status_code, _headers = edit_remove_exif_data_with_http_info(image_file, opts)
|
598
|
+
return data
|
599
|
+
end
|
600
|
+
|
601
|
+
# Remove EXIF data from the image
|
602
|
+
# Removes any EXIF data and profiles .
|
603
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
604
|
+
# @param [Hash] opts the optional parameters
|
605
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
606
|
+
def edit_remove_exif_data_with_http_info(image_file, opts = {})
|
607
|
+
if @api_client.config.debugging
|
608
|
+
@api_client.config.logger.debug "Calling API: EditApi.edit_remove_exif_data ..."
|
609
|
+
end
|
610
|
+
# verify the required parameter 'image_file' is set
|
611
|
+
if @api_client.config.client_side_validation && image_file.nil?
|
612
|
+
fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_remove_exif_data"
|
613
|
+
end
|
614
|
+
# resource path
|
615
|
+
local_var_path = "/image/edit/remove-exif"
|
616
|
+
|
617
|
+
# query parameters
|
618
|
+
query_params = {}
|
619
|
+
|
620
|
+
# header parameters
|
621
|
+
header_params = {}
|
622
|
+
# HTTP header 'Accept' (if needed)
|
623
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
624
|
+
# HTTP header 'Content-Type'
|
625
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
626
|
+
|
627
|
+
# form parameters
|
628
|
+
form_params = {}
|
629
|
+
form_params["imageFile"] = image_file
|
630
|
+
|
631
|
+
# http body (model)
|
632
|
+
post_body = nil
|
633
|
+
auth_names = ['Apikey']
|
634
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
635
|
+
:header_params => header_params,
|
636
|
+
:query_params => query_params,
|
637
|
+
:form_params => form_params,
|
638
|
+
:body => post_body,
|
639
|
+
:auth_names => auth_names,
|
640
|
+
:return_type => 'String')
|
641
|
+
if @api_client.config.debugging
|
642
|
+
@api_client.config.logger.debug "API called: EditApi#edit_remove_exif_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
643
|
+
end
|
644
|
+
return data, status_code, headers
|
645
|
+
end
|
646
|
+
|
535
647
|
# Remove transparency from the image
|
536
648
|
# Removes any active transparency in the image. Effectively renders the image at the same resolution, in the same file format, over a white background, thus removing transparency.
|
537
649
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
data/spec/api/edit_api_spec.rb
CHANGED
@@ -139,6 +139,30 @@ describe 'EditApi' do
|
|
139
139
|
end
|
140
140
|
end
|
141
141
|
|
142
|
+
# unit tests for edit_invert
|
143
|
+
# Invert, negate the colors in the image
|
144
|
+
# 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.
|
145
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
146
|
+
# @param [Hash] opts the optional parameters
|
147
|
+
# @return [String]
|
148
|
+
describe 'edit_invert test' do
|
149
|
+
it "should work" do
|
150
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
# unit tests for edit_remove_exif_data
|
155
|
+
# Remove EXIF data from the image
|
156
|
+
# Removes any EXIF data and profiles .
|
157
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
158
|
+
# @param [Hash] opts the optional parameters
|
159
|
+
# @return [String]
|
160
|
+
describe 'edit_remove_exif_data test' do
|
161
|
+
it "should work" do
|
162
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
142
166
|
# unit tests for edit_remove_transparency
|
143
167
|
# Remove transparency from the image
|
144
168
|
# Removes any active transparency in the image. Effectively renders the image at the same resolution, in the same file format, over a white background, thus removing transparency.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudmersive-image-recognition-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cloudmersive
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|