aspose_imaging_cloud 1.0.0 → 19.12
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 +5 -5
- data/README.md +224 -61
- data/lib/aspose-imaging-cloud.rb +161 -0
- data/lib/aspose-imaging-cloud/api/imaging_api.rb +684 -0
- data/lib/aspose-imaging-cloud/api_client.rb +357 -0
- data/lib/aspose-imaging-cloud/api_error.rb +42 -0
- data/lib/{aspose_imaging_cloud → aspose-imaging-cloud}/configuration.rb +236 -166
- data/lib/aspose-imaging-cloud/models/big_rectangular_filter_properties.rb +206 -0
- data/lib/aspose-imaging-cloud/models/bilateral_smoothing_filter_properties.rb +281 -0
- data/lib/aspose-imaging-cloud/models/bmp_properties.rb +202 -0
- data/lib/aspose-imaging-cloud/models/convolution_filter_properties.rb +236 -0
- data/lib/aspose-imaging-cloud/models/deconvolution_filter_properties.rb +266 -0
- data/lib/aspose-imaging-cloud/models/dicom_properties.rb +584 -0
- data/lib/aspose-imaging-cloud/models/disc_usage.rb +222 -0
- data/lib/aspose-imaging-cloud/models/djvu_properties.rb +232 -0
- data/lib/aspose-imaging-cloud/models/dng_properties.rb +329 -0
- data/lib/aspose-imaging-cloud/models/error.rb +232 -0
- data/lib/aspose-imaging-cloud/models/error_details.rb +217 -0
- data/lib/aspose-imaging-cloud/models/exif_data.rb +1560 -0
- data/lib/aspose-imaging-cloud/models/file_version.rb +277 -0
- data/lib/aspose-imaging-cloud/models/file_versions.rb +204 -0
- data/lib/aspose-imaging-cloud/models/files_list.rb +204 -0
- data/lib/aspose-imaging-cloud/models/files_upload_result.rb +216 -0
- data/lib/aspose-imaging-cloud/models/filter_properties_base.rb +206 -0
- data/lib/aspose-imaging-cloud/models/gauss_wiener_filter_properties.rb +296 -0
- data/lib/aspose-imaging-cloud/models/gaussian_blur_filter_properties.rb +266 -0
- data/lib/aspose-imaging-cloud/models/gif_properties.rb +247 -0
- data/lib/aspose-imaging-cloud/models/image_duplicates.rb +204 -0
- data/lib/aspose-imaging-cloud/models/image_duplicates_set.rb +204 -0
- data/lib/aspose-imaging-cloud/models/image_features.rb +257 -0
- data/lib/aspose-imaging-cloud/models/imaging_response.rb +412 -0
- data/lib/aspose-imaging-cloud/models/jfif_data.rb +247 -0
- data/lib/aspose-imaging-cloud/models/jpeg2000_properties.rb +214 -0
- data/lib/aspose-imaging-cloud/models/jpeg_exif_data.rb +1738 -0
- data/lib/aspose-imaging-cloud/models/jpeg_properties.rb +222 -0
- data/lib/aspose-imaging-cloud/models/median_filter_properties.rb +221 -0
- data/lib/aspose-imaging-cloud/models/motion_wiener_filter_properties.rb +311 -0
- data/lib/aspose-imaging-cloud/models/object_exist.rb +222 -0
- data/lib/aspose-imaging-cloud/models/odg_metadata.rb +372 -0
- data/lib/aspose-imaging-cloud/models/odg_page.rb +222 -0
- data/lib/aspose-imaging-cloud/models/odg_properties.rb +229 -0
- data/lib/aspose-imaging-cloud/models/png_properties.rb +192 -0
- data/lib/aspose-imaging-cloud/models/psd_properties.rb +242 -0
- data/lib/aspose-imaging-cloud/models/requests/add_search_image_request.rb +91 -0
- data/lib/aspose-imaging-cloud/models/requests/append_tiff_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/compare_images_request.rb +94 -0
- data/lib/aspose-imaging-cloud/models/requests/convert_tiff_to_fax_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/copy_file_request.rb +91 -0
- data/lib/aspose-imaging-cloud/models/requests/copy_folder_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/create_cropped_image_request.rb +121 -0
- data/lib/aspose-imaging-cloud/models/requests/create_folder_request.rb +77 -0
- data/lib/aspose-imaging-cloud/models/requests/create_image_features_request.rb +89 -0
- data/lib/aspose-imaging-cloud/models/requests/create_image_frame_request.rb +112 -0
- data/lib/aspose-imaging-cloud/models/requests/create_image_search_request.rb +79 -0
- data/lib/aspose-imaging-cloud/models/requests/create_image_tag_request.rb +96 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_bmp_request.rb +108 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_emf_request.rb +127 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_gif_request.rb +102 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_jpeg2000_request.rb +95 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_jpeg_request.rb +90 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_psd_request.rb +90 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_svg_request.rb +114 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_tiff_request.rb +104 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_web_p_request.rb +116 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_wmf_request.rb +127 -0
- data/lib/aspose-imaging-cloud/models/requests/create_resized_image_request.rb +105 -0
- data/lib/aspose-imaging-cloud/models/requests/create_rotate_flipped_image_request.rb +97 -0
- data/lib/aspose-imaging-cloud/models/requests/create_saved_image_as_request.rb +89 -0
- data/lib/aspose-imaging-cloud/models/requests/create_updated_image_request.rb +145 -0
- data/lib/aspose-imaging-cloud/models/requests/create_web_site_image_features_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/crop_image_request.rb +120 -0
- data/lib/aspose-imaging-cloud/models/requests/delete_file_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/delete_folder_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/delete_image_features_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/delete_image_search_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/delete_search_image_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/download_file_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/extract_image_features_request.rb +91 -0
- data/lib/aspose-imaging-cloud/models/requests/extract_image_frame_properties_request.rb +82 -0
- data/lib/aspose-imaging-cloud/models/requests/extract_image_properties_request.rb +75 -0
- data/lib/aspose-imaging-cloud/models/requests/filter_effect_image_request.rb +103 -0
- data/lib/aspose-imaging-cloud/models/requests/find_image_duplicates_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/find_images_by_tags_request.rb +104 -0
- data/lib/aspose-imaging-cloud/models/requests/find_similar_images_request.rb +102 -0
- data/lib/aspose-imaging-cloud/models/requests/get_disc_usage_request.rb +70 -0
- data/lib/aspose-imaging-cloud/models/requests/get_file_versions_request.rb +77 -0
- data/lib/aspose-imaging-cloud/models/requests/get_files_list_request.rb +77 -0
- data/lib/aspose-imaging-cloud/models/requests/get_image_features_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/get_image_frame_properties_request.rb +87 -0
- data/lib/aspose-imaging-cloud/models/requests/get_image_frame_request.rb +111 -0
- data/lib/aspose-imaging-cloud/models/requests/get_image_properties_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/get_image_search_status_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/get_search_image_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/http_request.rb +50 -0
- data/lib/aspose-imaging-cloud/models/requests/imaging_request.rb +101 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_bmp_request.rb +107 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_emf_request.rb +126 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_gif_request.rb +101 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_jpeg2000_request.rb +94 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_jpeg_request.rb +89 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_psd_request.rb +89 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_svg_request.rb +113 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_tiff_request.rb +103 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_web_p_request.rb +115 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_wmf_request.rb +126 -0
- data/lib/aspose-imaging-cloud/models/requests/move_file_request.rb +91 -0
- data/lib/aspose-imaging-cloud/models/requests/move_folder_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/object_exists_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/resize_image_request.rb +104 -0
- data/lib/aspose-imaging-cloud/models/requests/rotate_flip_image_request.rb +96 -0
- data/lib/aspose-imaging-cloud/models/requests/save_image_as_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/storage_exists_request.rb +74 -0
- data/lib/aspose-imaging-cloud/models/requests/update_image_features_request.rb +91 -0
- data/lib/aspose-imaging-cloud/models/requests/update_image_request.rb +144 -0
- data/lib/aspose-imaging-cloud/models/requests/update_search_image_request.rb +91 -0
- data/lib/aspose-imaging-cloud/models/requests/upload_file_request.rb +86 -0
- data/lib/aspose-imaging-cloud/models/search_context_status.rb +212 -0
- data/lib/aspose-imaging-cloud/models/search_result.rb +217 -0
- data/lib/aspose-imaging-cloud/models/search_results_set.rb +204 -0
- data/lib/aspose-imaging-cloud/models/sharpen_filter_properties.rb +266 -0
- data/lib/aspose-imaging-cloud/models/small_rectangular_filter_properties.rb +206 -0
- data/lib/aspose-imaging-cloud/models/storage_exist.rb +207 -0
- data/lib/aspose-imaging-cloud/models/storage_file.rb +252 -0
- data/lib/aspose-imaging-cloud/models/svg_properties.rb +202 -0
- data/lib/aspose-imaging-cloud/models/tiff_frame.rb +242 -0
- data/lib/aspose-imaging-cloud/models/tiff_options.rb +734 -0
- data/lib/aspose-imaging-cloud/models/tiff_properties.rb +224 -0
- data/lib/aspose-imaging-cloud/models/web_p_properties.rb +252 -0
- data/lib/aspose-imaging-cloud/version.rb +15 -0
- metadata +149 -129
- data/LICENSE +0 -22
- data/aspose_imaging_cloud.gemspec +0 -26
- data/lib/aspose_imaging_cloud.rb +0 -43
- data/lib/aspose_imaging_cloud/api/imaging_api.rb +0 -1776
- data/lib/aspose_imaging_cloud/api_client.rb +0 -335
- data/lib/aspose_imaging_cloud/api_error.rb +0 -24
- data/lib/aspose_imaging_cloud/models/base_object.rb +0 -86
- data/lib/aspose_imaging_cloud/models/base_response.rb +0 -53
- data/lib/aspose_imaging_cloud/models/bmp_properties.rb +0 -37
- data/lib/aspose_imaging_cloud/models/exif_data.rb +0 -855
- data/lib/aspose_imaging_cloud/models/gif_properties.rb +0 -53
- data/lib/aspose_imaging_cloud/models/imaging_response.rb +0 -149
- data/lib/aspose_imaging_cloud/models/jfif_data.rb +0 -61
- data/lib/aspose_imaging_cloud/models/jpeg_exif_data.rb +0 -991
- data/lib/aspose_imaging_cloud/models/jpeg_properties.rb +0 -53
- data/lib/aspose_imaging_cloud/models/psd_properties.rb +0 -61
- data/lib/aspose_imaging_cloud/models/tiff_frame.rb +0 -61
- data/lib/aspose_imaging_cloud/models/tiff_options.rb +0 -419
- data/lib/aspose_imaging_cloud/models/tiff_properties.rb +0 -55
- data/lib/aspose_imaging_cloud/version.rb +0 -3
- data/test/data/TestDemo.tif +0 -0
- data/test/data/aspose.jpg +0 -0
- data/test/data/aspose_imaging_for_cloud.png +0 -0
- data/test/data/demo.tif +0 -0
- data/test/data/sample-multi.tif +0 -0
- data/test/data/sample.bmp +0 -0
- data/test/data/sample.gif +0 -0
- data/test/data/sample.psd +0 -0
- data/test/data/sample.tif +0 -0
- data/test/data/test.bmp +0 -0
- data/test/imaging_tests.rb +0 -291
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# ----------------------------------------------------------------------------
|
|
2
|
+
# <copyright company="Aspose" file="create_resized_image_request.rb">
|
|
3
|
+
# Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
|
|
4
|
+
# </copyright>
|
|
5
|
+
# <summary>
|
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
7
|
+
# copy of this software and associated documentation files (the "Software"),
|
|
8
|
+
# to deal in the Software without restriction, including without limitation
|
|
9
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
10
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
|
11
|
+
# Software is furnished to do so, subject to the following conditions:
|
|
12
|
+
#
|
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
|
14
|
+
# all copies or substantial portions of the Software.
|
|
15
|
+
#
|
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
+
# DEALINGS IN THE SOFTWARE.
|
|
23
|
+
# </summary>
|
|
24
|
+
# ----------------------------------------------------------------------------
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
require_relative './imaging_request'
|
|
28
|
+
require_relative './http_request'
|
|
29
|
+
|
|
30
|
+
module AsposeImagingCloud
|
|
31
|
+
# Request model for create_resized_image operation.
|
|
32
|
+
class CreateResizedImageRequest < ImagingRequest
|
|
33
|
+
|
|
34
|
+
# Resize an image. Image data is passed as zero-indexed multipart/form-data content or as raw body stream.
|
|
35
|
+
# @param [File] image_data Input image
|
|
36
|
+
# @param [String] format Resulting image format. Please, refer to https://docs.aspose.cloud/display/imagingcloud/Supported+File+Formats#SupportedFileFormats-CommonOperationsFormatSupportMap for possible use-cases.
|
|
37
|
+
# @param [Integer] new_width New width.
|
|
38
|
+
# @param [Integer] new_height New height.
|
|
39
|
+
# @param [String] out_path Path to updated file (if this is empty, response contains streamed image).
|
|
40
|
+
# @param [String] storage Your Aspose Cloud Storage name.
|
|
41
|
+
def initialize(image_data, format, new_width, new_height, out_path = nil, storage = nil)
|
|
42
|
+
@image_data = image_data
|
|
43
|
+
@format = format
|
|
44
|
+
@new_width = new_width
|
|
45
|
+
@new_height = new_height
|
|
46
|
+
@out_path = out_path
|
|
47
|
+
@storage = storage
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def to_http_info(config)
|
|
51
|
+
# verify the required parameter 'image_data' is set
|
|
52
|
+
if config.client_side_validation && @image_data.nil?
|
|
53
|
+
raise ArgumentError, "Missing the required parameter 'image_data' when calling ImagingApi.create_resized_image"
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# verify the required parameter 'format' is set
|
|
57
|
+
if config.client_side_validation && @format.nil?
|
|
58
|
+
raise ArgumentError, "Missing the required parameter 'format' when calling ImagingApi.create_resized_image"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# verify the required parameter 'new_width' is set
|
|
62
|
+
if config.client_side_validation && @new_width.nil?
|
|
63
|
+
raise ArgumentError, "Missing the required parameter 'new_width' when calling ImagingApi.create_resized_image"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# verify the required parameter 'new_height' is set
|
|
67
|
+
if config.client_side_validation && @new_height.nil?
|
|
68
|
+
raise ArgumentError, "Missing the required parameter 'new_height' when calling ImagingApi.create_resized_image"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# resource path
|
|
72
|
+
local_var_path = '/imaging/resize'
|
|
73
|
+
|
|
74
|
+
# query parameters
|
|
75
|
+
query_params = {}
|
|
76
|
+
query_params[:format] = @format
|
|
77
|
+
query_params[:newWidth] = @new_width
|
|
78
|
+
query_params[:newHeight] = @new_height
|
|
79
|
+
query_params[:outPath] = @out_path unless @out_path.nil?
|
|
80
|
+
query_params[:storage] = @storage unless @storage.nil?
|
|
81
|
+
|
|
82
|
+
# form parameters
|
|
83
|
+
form_params = {}
|
|
84
|
+
form_params['imageData'] = @image_data
|
|
85
|
+
|
|
86
|
+
# http body (model)
|
|
87
|
+
post_body = nil
|
|
88
|
+
auth_names = ['JWT']
|
|
89
|
+
|
|
90
|
+
# header parameters
|
|
91
|
+
header_params = {}
|
|
92
|
+
# HTTP header 'Accept' (if needed)
|
|
93
|
+
header_params['Accept'] = select_header_accept(['application/json'])
|
|
94
|
+
# HTTP header 'Content-Type'
|
|
95
|
+
header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['multipart/form-data'])
|
|
96
|
+
|
|
97
|
+
AsposeImagingCloud::HttpRequest.new(local_var_path,
|
|
98
|
+
header_params,
|
|
99
|
+
query_params,
|
|
100
|
+
form_params,
|
|
101
|
+
post_body,
|
|
102
|
+
auth_names)
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# ----------------------------------------------------------------------------
|
|
2
|
+
# <copyright company="Aspose" file="create_rotate_flipped_image_request.rb">
|
|
3
|
+
# Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
|
|
4
|
+
# </copyright>
|
|
5
|
+
# <summary>
|
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
7
|
+
# copy of this software and associated documentation files (the "Software"),
|
|
8
|
+
# to deal in the Software without restriction, including without limitation
|
|
9
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
10
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
|
11
|
+
# Software is furnished to do so, subject to the following conditions:
|
|
12
|
+
#
|
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
|
14
|
+
# all copies or substantial portions of the Software.
|
|
15
|
+
#
|
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
+
# DEALINGS IN THE SOFTWARE.
|
|
23
|
+
# </summary>
|
|
24
|
+
# ----------------------------------------------------------------------------
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
require_relative './imaging_request'
|
|
28
|
+
require_relative './http_request'
|
|
29
|
+
|
|
30
|
+
module AsposeImagingCloud
|
|
31
|
+
# Request model for create_rotate_flipped_image operation.
|
|
32
|
+
class CreateRotateFlippedImageRequest < ImagingRequest
|
|
33
|
+
|
|
34
|
+
# Rotate and/or flip an image. Image data is passed as zero-indexed multipart/form-data content or as raw body stream.
|
|
35
|
+
# @param [File] image_data Input image
|
|
36
|
+
# @param [String] format Resulting image format. Please, refer to https://docs.aspose.cloud/display/imagingcloud/Supported+File+Formats#SupportedFileFormats-CommonOperationsFormatSupportMap for possible use-cases.
|
|
37
|
+
# @param [String] method RotateFlip method (Rotate180FlipNone, Rotate180FlipX, Rotate180FlipXY, Rotate180FlipY, Rotate270FlipNone, Rotate270FlipX, Rotate270FlipXY, Rotate270FlipY, Rotate90FlipNone, Rotate90FlipX, Rotate90FlipXY, Rotate90FlipY, RotateNoneFlipNone, RotateNoneFlipX, RotateNoneFlipXY, RotateNoneFlipY).
|
|
38
|
+
# @param [String] out_path Path to updated file (if this is empty, response contains streamed image).
|
|
39
|
+
# @param [String] storage Your Aspose Cloud Storage name.
|
|
40
|
+
def initialize(image_data, format, method, out_path = nil, storage = nil)
|
|
41
|
+
@image_data = image_data
|
|
42
|
+
@format = format
|
|
43
|
+
@method = method
|
|
44
|
+
@out_path = out_path
|
|
45
|
+
@storage = storage
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def to_http_info(config)
|
|
49
|
+
# verify the required parameter 'image_data' is set
|
|
50
|
+
if config.client_side_validation && @image_data.nil?
|
|
51
|
+
raise ArgumentError, "Missing the required parameter 'image_data' when calling ImagingApi.create_rotate_flipped_image"
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# verify the required parameter 'format' is set
|
|
55
|
+
if config.client_side_validation && @format.nil?
|
|
56
|
+
raise ArgumentError, "Missing the required parameter 'format' when calling ImagingApi.create_rotate_flipped_image"
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# verify the required parameter 'method' is set
|
|
60
|
+
if config.client_side_validation && @method.nil?
|
|
61
|
+
raise ArgumentError, "Missing the required parameter 'method' when calling ImagingApi.create_rotate_flipped_image"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# resource path
|
|
65
|
+
local_var_path = '/imaging/rotateflip'
|
|
66
|
+
|
|
67
|
+
# query parameters
|
|
68
|
+
query_params = {}
|
|
69
|
+
query_params[:format] = @format
|
|
70
|
+
query_params[:method] = @method
|
|
71
|
+
query_params[:outPath] = @out_path unless @out_path.nil?
|
|
72
|
+
query_params[:storage] = @storage unless @storage.nil?
|
|
73
|
+
|
|
74
|
+
# form parameters
|
|
75
|
+
form_params = {}
|
|
76
|
+
form_params['imageData'] = @image_data
|
|
77
|
+
|
|
78
|
+
# http body (model)
|
|
79
|
+
post_body = nil
|
|
80
|
+
auth_names = ['JWT']
|
|
81
|
+
|
|
82
|
+
# header parameters
|
|
83
|
+
header_params = {}
|
|
84
|
+
# HTTP header 'Accept' (if needed)
|
|
85
|
+
header_params['Accept'] = select_header_accept(['application/json'])
|
|
86
|
+
# HTTP header 'Content-Type'
|
|
87
|
+
header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['multipart/form-data'])
|
|
88
|
+
|
|
89
|
+
AsposeImagingCloud::HttpRequest.new(local_var_path,
|
|
90
|
+
header_params,
|
|
91
|
+
query_params,
|
|
92
|
+
form_params,
|
|
93
|
+
post_body,
|
|
94
|
+
auth_names)
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# ----------------------------------------------------------------------------
|
|
2
|
+
# <copyright company="Aspose" file="create_saved_image_as_request.rb">
|
|
3
|
+
# Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
|
|
4
|
+
# </copyright>
|
|
5
|
+
# <summary>
|
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
7
|
+
# copy of this software and associated documentation files (the "Software"),
|
|
8
|
+
# to deal in the Software without restriction, including without limitation
|
|
9
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
10
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
|
11
|
+
# Software is furnished to do so, subject to the following conditions:
|
|
12
|
+
#
|
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
|
14
|
+
# all copies or substantial portions of the Software.
|
|
15
|
+
#
|
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
+
# DEALINGS IN THE SOFTWARE.
|
|
23
|
+
# </summary>
|
|
24
|
+
# ----------------------------------------------------------------------------
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
require_relative './imaging_request'
|
|
28
|
+
require_relative './http_request'
|
|
29
|
+
|
|
30
|
+
module AsposeImagingCloud
|
|
31
|
+
# Request model for create_saved_image_as operation.
|
|
32
|
+
class CreateSavedImageAsRequest < ImagingRequest
|
|
33
|
+
|
|
34
|
+
# Export existing image to another format. Image data is passed as zero-indexed multipart/form-data content or as raw body stream.
|
|
35
|
+
# @param [File] image_data Input image
|
|
36
|
+
# @param [String] format Resulting image format. Please, refer to https://docs.aspose.cloud/display/imagingcloud/Supported+File+Formats#SupportedFileFormats-CommonOperationsFormatSupportMap for possible use-cases.
|
|
37
|
+
# @param [String] out_path Path to updated file (if this is empty, response contains streamed image).
|
|
38
|
+
# @param [String] storage Your Aspose Cloud Storage name.
|
|
39
|
+
def initialize(image_data, format, out_path = nil, storage = nil)
|
|
40
|
+
@image_data = image_data
|
|
41
|
+
@format = format
|
|
42
|
+
@out_path = out_path
|
|
43
|
+
@storage = storage
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def to_http_info(config)
|
|
47
|
+
# verify the required parameter 'image_data' is set
|
|
48
|
+
if config.client_side_validation && @image_data.nil?
|
|
49
|
+
raise ArgumentError, "Missing the required parameter 'image_data' when calling ImagingApi.create_saved_image_as"
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# verify the required parameter 'format' is set
|
|
53
|
+
if config.client_side_validation && @format.nil?
|
|
54
|
+
raise ArgumentError, "Missing the required parameter 'format' when calling ImagingApi.create_saved_image_as"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# resource path
|
|
58
|
+
local_var_path = '/imaging/saveAs'
|
|
59
|
+
|
|
60
|
+
# query parameters
|
|
61
|
+
query_params = {}
|
|
62
|
+
query_params[:format] = @format
|
|
63
|
+
query_params[:outPath] = @out_path unless @out_path.nil?
|
|
64
|
+
query_params[:storage] = @storage unless @storage.nil?
|
|
65
|
+
|
|
66
|
+
# form parameters
|
|
67
|
+
form_params = {}
|
|
68
|
+
form_params['imageData'] = @image_data
|
|
69
|
+
|
|
70
|
+
# http body (model)
|
|
71
|
+
post_body = nil
|
|
72
|
+
auth_names = ['JWT']
|
|
73
|
+
|
|
74
|
+
# header parameters
|
|
75
|
+
header_params = {}
|
|
76
|
+
# HTTP header 'Accept' (if needed)
|
|
77
|
+
header_params['Accept'] = select_header_accept(['application/json'])
|
|
78
|
+
# HTTP header 'Content-Type'
|
|
79
|
+
header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['multipart/form-data'])
|
|
80
|
+
|
|
81
|
+
AsposeImagingCloud::HttpRequest.new(local_var_path,
|
|
82
|
+
header_params,
|
|
83
|
+
query_params,
|
|
84
|
+
form_params,
|
|
85
|
+
post_body,
|
|
86
|
+
auth_names)
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# ----------------------------------------------------------------------------
|
|
2
|
+
# <copyright company="Aspose" file="create_updated_image_request.rb">
|
|
3
|
+
# Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
|
|
4
|
+
# </copyright>
|
|
5
|
+
# <summary>
|
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
7
|
+
# copy of this software and associated documentation files (the "Software"),
|
|
8
|
+
# to deal in the Software without restriction, including without limitation
|
|
9
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
10
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
|
11
|
+
# Software is furnished to do so, subject to the following conditions:
|
|
12
|
+
#
|
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
|
14
|
+
# all copies or substantial portions of the Software.
|
|
15
|
+
#
|
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
+
# DEALINGS IN THE SOFTWARE.
|
|
23
|
+
# </summary>
|
|
24
|
+
# ----------------------------------------------------------------------------
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
require_relative './imaging_request'
|
|
28
|
+
require_relative './http_request'
|
|
29
|
+
|
|
30
|
+
module AsposeImagingCloud
|
|
31
|
+
# Request model for create_updated_image operation.
|
|
32
|
+
class CreateUpdatedImageRequest < ImagingRequest
|
|
33
|
+
|
|
34
|
+
# Perform scaling, cropping and flipping of an image in a single request. Image data is passed as zero-indexed multipart/form-data content or as raw body stream.
|
|
35
|
+
# @param [File] image_data Input image
|
|
36
|
+
# @param [String] format Resulting image format. Please, refer to https://docs.aspose.cloud/display/imagingcloud/Supported+File+Formats#SupportedFileFormats-CommonOperationsFormatSupportMap for possible use-cases.
|
|
37
|
+
# @param [Integer] new_width New width of the scaled image.
|
|
38
|
+
# @param [Integer] new_height New height of the scaled image.
|
|
39
|
+
# @param [Integer] x X position of start point for cropping rectangle.
|
|
40
|
+
# @param [Integer] y Y position of start point for cropping rectangle.
|
|
41
|
+
# @param [Integer] rect_width Width of cropping rectangle.
|
|
42
|
+
# @param [Integer] rect_height Height of cropping rectangle.
|
|
43
|
+
# @param [String] rotate_flip_method RotateFlip method (Rotate180FlipNone, Rotate180FlipX, Rotate180FlipXY, Rotate180FlipY, Rotate270FlipNone, Rotate270FlipX, Rotate270FlipXY, Rotate270FlipY, Rotate90FlipNone, Rotate90FlipX, Rotate90FlipXY, Rotate90FlipY, RotateNoneFlipNone, RotateNoneFlipX, RotateNoneFlipXY, RotateNoneFlipY). Default is RotateNoneFlipNone.
|
|
44
|
+
# @param [String] out_path Path to updated file (if this is empty, response contains streamed image).
|
|
45
|
+
# @param [String] storage Your Aspose Cloud Storage name.
|
|
46
|
+
def initialize(image_data, format, new_width, new_height, x, y, rect_width, rect_height, rotate_flip_method, out_path = nil, storage = nil)
|
|
47
|
+
@image_data = image_data
|
|
48
|
+
@format = format
|
|
49
|
+
@new_width = new_width
|
|
50
|
+
@new_height = new_height
|
|
51
|
+
@x = x
|
|
52
|
+
@y = y
|
|
53
|
+
@rect_width = rect_width
|
|
54
|
+
@rect_height = rect_height
|
|
55
|
+
@rotate_flip_method = rotate_flip_method
|
|
56
|
+
@out_path = out_path
|
|
57
|
+
@storage = storage
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def to_http_info(config)
|
|
61
|
+
# verify the required parameter 'image_data' is set
|
|
62
|
+
if config.client_side_validation && @image_data.nil?
|
|
63
|
+
raise ArgumentError, "Missing the required parameter 'image_data' when calling ImagingApi.create_updated_image"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# verify the required parameter 'format' is set
|
|
67
|
+
if config.client_side_validation && @format.nil?
|
|
68
|
+
raise ArgumentError, "Missing the required parameter 'format' when calling ImagingApi.create_updated_image"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# verify the required parameter 'new_width' is set
|
|
72
|
+
if config.client_side_validation && @new_width.nil?
|
|
73
|
+
raise ArgumentError, "Missing the required parameter 'new_width' when calling ImagingApi.create_updated_image"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# verify the required parameter 'new_height' is set
|
|
77
|
+
if config.client_side_validation && @new_height.nil?
|
|
78
|
+
raise ArgumentError, "Missing the required parameter 'new_height' when calling ImagingApi.create_updated_image"
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# verify the required parameter 'x' is set
|
|
82
|
+
if config.client_side_validation && @x.nil?
|
|
83
|
+
raise ArgumentError, "Missing the required parameter 'x' when calling ImagingApi.create_updated_image"
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# verify the required parameter 'y' is set
|
|
87
|
+
if config.client_side_validation && @y.nil?
|
|
88
|
+
raise ArgumentError, "Missing the required parameter 'y' when calling ImagingApi.create_updated_image"
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# verify the required parameter 'rect_width' is set
|
|
92
|
+
if config.client_side_validation && @rect_width.nil?
|
|
93
|
+
raise ArgumentError, "Missing the required parameter 'rect_width' when calling ImagingApi.create_updated_image"
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# verify the required parameter 'rect_height' is set
|
|
97
|
+
if config.client_side_validation && @rect_height.nil?
|
|
98
|
+
raise ArgumentError, "Missing the required parameter 'rect_height' when calling ImagingApi.create_updated_image"
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# verify the required parameter 'rotate_flip_method' is set
|
|
102
|
+
if config.client_side_validation && @rotate_flip_method.nil?
|
|
103
|
+
raise ArgumentError, "Missing the required parameter 'rotate_flip_method' when calling ImagingApi.create_updated_image"
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# resource path
|
|
107
|
+
local_var_path = '/imaging/updateImage'
|
|
108
|
+
|
|
109
|
+
# query parameters
|
|
110
|
+
query_params = {}
|
|
111
|
+
query_params[:format] = @format
|
|
112
|
+
query_params[:newWidth] = @new_width
|
|
113
|
+
query_params[:newHeight] = @new_height
|
|
114
|
+
query_params[:x] = @x
|
|
115
|
+
query_params[:y] = @y
|
|
116
|
+
query_params[:rectWidth] = @rect_width
|
|
117
|
+
query_params[:rectHeight] = @rect_height
|
|
118
|
+
query_params[:rotateFlipMethod] = @rotate_flip_method
|
|
119
|
+
query_params[:outPath] = @out_path unless @out_path.nil?
|
|
120
|
+
query_params[:storage] = @storage unless @storage.nil?
|
|
121
|
+
|
|
122
|
+
# form parameters
|
|
123
|
+
form_params = {}
|
|
124
|
+
form_params['imageData'] = @image_data
|
|
125
|
+
|
|
126
|
+
# http body (model)
|
|
127
|
+
post_body = nil
|
|
128
|
+
auth_names = ['JWT']
|
|
129
|
+
|
|
130
|
+
# header parameters
|
|
131
|
+
header_params = {}
|
|
132
|
+
# HTTP header 'Accept' (if needed)
|
|
133
|
+
header_params['Accept'] = select_header_accept(['application/json'])
|
|
134
|
+
# HTTP header 'Content-Type'
|
|
135
|
+
header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['multipart/form-data'])
|
|
136
|
+
|
|
137
|
+
AsposeImagingCloud::HttpRequest.new(local_var_path,
|
|
138
|
+
header_params,
|
|
139
|
+
query_params,
|
|
140
|
+
form_params,
|
|
141
|
+
post_body,
|
|
142
|
+
auth_names)
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
end
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# ----------------------------------------------------------------------------
|
|
2
|
+
# <copyright company="Aspose" file="create_web_site_image_features_request.rb">
|
|
3
|
+
# Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
|
|
4
|
+
# </copyright>
|
|
5
|
+
# <summary>
|
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
7
|
+
# copy of this software and associated documentation files (the "Software"),
|
|
8
|
+
# to deal in the Software without restriction, including without limitation
|
|
9
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
10
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
|
11
|
+
# Software is furnished to do so, subject to the following conditions:
|
|
12
|
+
#
|
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
|
14
|
+
# all copies or substantial portions of the Software.
|
|
15
|
+
#
|
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
+
# DEALINGS IN THE SOFTWARE.
|
|
23
|
+
# </summary>
|
|
24
|
+
# ----------------------------------------------------------------------------
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
require_relative './imaging_request'
|
|
28
|
+
require_relative './http_request'
|
|
29
|
+
|
|
30
|
+
module AsposeImagingCloud
|
|
31
|
+
# Request model for create_web_site_image_features operation.
|
|
32
|
+
class CreateWebSiteImageFeaturesRequest < ImagingRequest
|
|
33
|
+
|
|
34
|
+
# Extract images features from web page and add them to search context
|
|
35
|
+
# @param [String] search_context_id The search context identifier.
|
|
36
|
+
# @param [String] images_source Images source - a web page
|
|
37
|
+
# @param [String] folder The folder.
|
|
38
|
+
# @param [String] storage The storage.
|
|
39
|
+
def initialize(search_context_id, images_source, folder = nil, storage = nil)
|
|
40
|
+
@search_context_id = search_context_id
|
|
41
|
+
@images_source = images_source
|
|
42
|
+
@folder = folder
|
|
43
|
+
@storage = storage
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def to_http_info(config)
|
|
47
|
+
# verify the required parameter 'search_context_id' is set
|
|
48
|
+
if config.client_side_validation && @search_context_id.nil?
|
|
49
|
+
raise ArgumentError, "Missing the required parameter 'search_context_id' when calling ImagingApi.create_web_site_image_features"
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# verify the required parameter 'images_source' is set
|
|
53
|
+
if config.client_side_validation && @images_source.nil?
|
|
54
|
+
raise ArgumentError, "Missing the required parameter 'images_source' when calling ImagingApi.create_web_site_image_features"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# resource path
|
|
58
|
+
local_var_path = '/imaging/ai/imageSearch/{searchContextId}/features/web'.sub('{' + 'searchContextId' + '}', @search_context_id.to_s)
|
|
59
|
+
|
|
60
|
+
# query parameters
|
|
61
|
+
query_params = {}
|
|
62
|
+
query_params[:imagesSource] = @images_source
|
|
63
|
+
query_params[:folder] = @folder unless @folder.nil?
|
|
64
|
+
query_params[:storage] = @storage unless @storage.nil?
|
|
65
|
+
|
|
66
|
+
# form parameters
|
|
67
|
+
form_params = {}
|
|
68
|
+
|
|
69
|
+
# http body (model)
|
|
70
|
+
post_body = nil
|
|
71
|
+
auth_names = ['JWT']
|
|
72
|
+
|
|
73
|
+
# header parameters
|
|
74
|
+
header_params = {}
|
|
75
|
+
# HTTP header 'Accept' (if needed)
|
|
76
|
+
header_params['Accept'] = select_header_accept(['application/json'])
|
|
77
|
+
# HTTP header 'Content-Type'
|
|
78
|
+
header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
|
|
79
|
+
|
|
80
|
+
AsposeImagingCloud::HttpRequest.new(local_var_path,
|
|
81
|
+
header_params,
|
|
82
|
+
query_params,
|
|
83
|
+
form_params,
|
|
84
|
+
post_body,
|
|
85
|
+
auth_names)
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|