aspose_imaging_cloud 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +22 -0
  3. data/README.md +61 -0
  4. data/aspose_imaging_cloud.gemspec +26 -0
  5. data/lib/aspose_imaging_cloud.rb +43 -0
  6. data/lib/aspose_imaging_cloud/api/imaging_api.rb +1776 -0
  7. data/lib/aspose_imaging_cloud/api_client.rb +335 -0
  8. data/lib/aspose_imaging_cloud/api_error.rb +24 -0
  9. data/lib/aspose_imaging_cloud/configuration.rb +166 -0
  10. data/lib/aspose_imaging_cloud/models/base_object.rb +86 -0
  11. data/lib/aspose_imaging_cloud/models/base_response.rb +53 -0
  12. data/lib/aspose_imaging_cloud/models/bmp_properties.rb +37 -0
  13. data/lib/aspose_imaging_cloud/models/exif_data.rb +855 -0
  14. data/lib/aspose_imaging_cloud/models/gif_properties.rb +53 -0
  15. data/lib/aspose_imaging_cloud/models/imaging_response.rb +149 -0
  16. data/lib/aspose_imaging_cloud/models/jfif_data.rb +61 -0
  17. data/lib/aspose_imaging_cloud/models/jpeg_exif_data.rb +991 -0
  18. data/lib/aspose_imaging_cloud/models/jpeg_properties.rb +53 -0
  19. data/lib/aspose_imaging_cloud/models/psd_properties.rb +61 -0
  20. data/lib/aspose_imaging_cloud/models/tiff_frame.rb +61 -0
  21. data/lib/aspose_imaging_cloud/models/tiff_options.rb +419 -0
  22. data/lib/aspose_imaging_cloud/models/tiff_properties.rb +55 -0
  23. data/lib/aspose_imaging_cloud/version.rb +3 -0
  24. data/test/data/TestDemo.tif +0 -0
  25. data/test/data/aspose.jpg +0 -0
  26. data/test/data/aspose_imaging_for_cloud.png +0 -0
  27. data/test/data/demo.tif +0 -0
  28. data/test/data/sample-multi.tif +0 -0
  29. data/test/data/sample.bmp +0 -0
  30. data/test/data/sample.gif +0 -0
  31. data/test/data/sample.psd +0 -0
  32. data/test/data/sample.tif +0 -0
  33. data/test/data/test.bmp +0 -0
  34. data/test/imaging_tests.rb +291 -0
  35. metadata +160 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 95b86ba764611a7aa85e6c9399541acaebfb3a9c
4
+ data.tar.gz: f8b1c1c73d57310ef7753208e7f5209f7c79db1d
5
+ SHA512:
6
+ metadata.gz: 4da2d845395e8034696675e78e556569f1b8c2d0f83b0194cd7e8d9348b7da0adb4c5b956c697bc8bfdd1a1ca38e5f43a4c9c4e9ee6fc11045eb0a83e7fe2c88
7
+ data.tar.gz: 43493953535926fd5a157ac6223334a41f95c8fb0e64154e7d33c493555776adef6b7f09f5dc4676f9e3691338c64259de4c006084785acdaea351b2108b0e79
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2001-2016 Aspose Pty Ltd
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
@@ -0,0 +1,61 @@
1
+ # Aspose.Imaging Cloud SDK For Ruby
2
+ This SDK lets you use [Aspose Cloud Imaging APIs](http://www.aspose.com/cloud/imaging-api.aspx) in your Ruby web apps.
3
+
4
+ ## Installing
5
+ You can simply install Aspose Imaging Cloud SDK with gem:
6
+
7
+ `gem install aspose_imaging_cloud`
8
+
9
+ ## Usage
10
+ APIs of this SDK can be called as follows:
11
+
12
+ ```ruby
13
+ require 'aspose_imaging_cloud'
14
+
15
+ class ImagingUsage
16
+
17
+ include AsposeImagingCloud
18
+ include AsposeStorageCloud
19
+
20
+ def initialize
21
+ #Get App key and App SID from https://cloud.aspose.com
22
+ AsposeApp.app_key_and_sid("APP_KEY", "APP_SID")
23
+ @imaging_api = ImagingApi.new
24
+ end
25
+
26
+ def upload_file(file_name)
27
+ @storage_api = StorageApi.new
28
+ response = @storage_api.put_create(file_name, File.open("data/" << file_name,"r") { |io| io.read } )
29
+ end
30
+
31
+ def post_image_bmp
32
+ #Update parameters of bmp image.
33
+ bits_per_pixel = 24
34
+ horizontal_resolution = 300
35
+ vertical_resolution = 300
36
+ file_name = "sample.bmp"
37
+ file = File.open("data/" << file_name,"r") { |io| io.read }
38
+
39
+ response = @imaging_api.post_image_bmp(bits_per_pixel, horizontal_resolution, vertical_resolution, file)
40
+ end
41
+
42
+ def post_image_rotate_flip
43
+ # Rotate and flip existing image and get it from response.
44
+ format = "png"
45
+ method = "Rotate180FlipX"
46
+ file_name = "aspose.jpg"
47
+ file = File.open("data/" << file_name,"r") { |io| io.read }
48
+
49
+ response = @imaging_api.post_image_rotate_flip(format, method, file)
50
+ end
51
+
52
+ end
53
+ ```
54
+ ## Unit Tests
55
+ Aspose Imaging SDK includes a suite of unit tests within the [test](https://github.com/asposeimaging/Aspose_Imaging_Cloud/blob/master/SDKs/Aspose.Imaging_Cloud_SDK_for_Ruby/test/imaging_tests.rb) subdirectory. These Unit Tests also serves as examples of how to use the Aspose Imaging SDK.
56
+
57
+ ## Contact
58
+ Your feedback is very important to us. Please email us all your queries and feedback at marketplace@aspose.com.
59
+
60
+ ## License
61
+ Aspose Imaging SDK is available under the MIT license. See the [LICENSE](https://github.com/asposeimaging/Aspose_Imaging_Cloud/blob/master/SDKs/Aspose.Imaging_Cloud_SDK_for_Ruby/LICENSE) file for more info.
@@ -0,0 +1,26 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "aspose_imaging_cloud/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "aspose_imaging_cloud"
7
+ s.version = AsposeImagingCloud::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["M. Sohail Ismail"]
10
+ s.email = ["muhammad.sohail@aspose.com"]
11
+ s.homepage = "http://www.aspose.com/cloud/imaging-api.aspx"
12
+ s.summary = %q{Aspose.Imaging for Cloud}
13
+ s.description = %q{Aspose.Imaging for Cloud lets you use a REST API to inspect, convert, and transform images in the cloud. It supports the most popular image formats such as PSD, PNG, GIF, BMP, TIFF, and JPEG, and conversion between them. Aspose.Imaging for Cloud also provides a rich set of features for manipulating images on-the-fly with cloud based image transformations. You can resize, crop and/or rotate images various ways by simply creating a request that includes the correct transformation instructions. The most demanding imaging routines, for example TIFF concatenation and image conversion to fax compatible format, are available through efficient and reliable specialized resources. You can perform these operations without needing to know what's going on under the hood so that you can focus on the core business goals.}
14
+ s.license = "MIT"
15
+
16
+ s.add_runtime_dependency 'typhoeus', '~> 0.8'
17
+ s.add_runtime_dependency 'json', '~> 1.7'
18
+ s.add_runtime_dependency 'aspose_storage_cloud', '~> 1.0', '>= 1.0.0'
19
+
20
+ s.add_development_dependency 'minitest', '~> 5.8'
21
+
22
+ s.files = `git ls-files`.split("\n")
23
+ s.test_files = `git ls-files -- test/*`.split("\n")
24
+ s.executables = []
25
+ s.require_paths = ["lib"]
26
+ end
@@ -0,0 +1,43 @@
1
+ require 'aspose_storage_cloud'
2
+
3
+ # Common files
4
+ require_relative 'aspose_imaging_cloud/api_client'
5
+ require_relative 'aspose_imaging_cloud/api_error'
6
+ require_relative 'aspose_imaging_cloud/version'
7
+ require_relative 'aspose_imaging_cloud/configuration'
8
+
9
+ # Models
10
+ require_relative 'aspose_imaging_cloud/models/base_object'
11
+ require_relative 'aspose_imaging_cloud/models/base_response'
12
+ require_relative 'aspose_imaging_cloud/models/imaging_response'
13
+ require_relative 'aspose_imaging_cloud/models/bmp_properties'
14
+ require_relative 'aspose_imaging_cloud/models/gif_properties'
15
+ require_relative 'aspose_imaging_cloud/models/jpeg_properties'
16
+ require_relative 'aspose_imaging_cloud/models/tiff_properties'
17
+ require_relative 'aspose_imaging_cloud/models/psd_properties'
18
+ require_relative 'aspose_imaging_cloud/models/jpeg_exif_data'
19
+ require_relative 'aspose_imaging_cloud/models/jfif_data'
20
+ require_relative 'aspose_imaging_cloud/models/tiff_frame'
21
+ require_relative 'aspose_imaging_cloud/models/exif_data'
22
+ require_relative 'aspose_imaging_cloud/models/tiff_options'
23
+
24
+ # APIs
25
+ require_relative 'aspose_imaging_cloud/api/imaging_api'
26
+
27
+ module AsposeImagingCloud
28
+ class << self
29
+ # Configure sdk using block.
30
+ # AsposeImagingCloud.configure do |config|
31
+ # config.username = "xxx"
32
+ # config.password = "xxx"
33
+ # end
34
+ # If no block given, return the configuration singleton instance.
35
+ def configure
36
+ if block_given?
37
+ yield Configuration.instance
38
+ else
39
+ Configuration.instance
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,1776 @@
1
+ require "uri"
2
+
3
+ module AsposeImagingCloud
4
+ class ImagingApi
5
+ attr_accessor :api_client
6
+
7
+ def initialize(api_client = nil)
8
+ @api_client = api_client || Configuration.api_client
9
+ end
10
+
11
+ # Update parameters of bmp image.
12
+ #
13
+ # @param bits_per_pixel Color depth.
14
+ # @param horizontal_resolution New horizontal resolution.
15
+ # @param vertical_resolution New vertical resolution.
16
+ # @param file
17
+ # @param [Hash] opts the optional parameters
18
+ # @option opts [BOOLEAN] :from_scratch Specifies where additional parameters we do not support should be taken from. If this is true – they will be taken from default values for standard image, if it is false – they will be saved from current image. Default is false.
19
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
20
+ # @return [File]
21
+ def post_image_bmp(bits_per_pixel, horizontal_resolution, vertical_resolution, file, opts = {})
22
+ if Configuration.debugging
23
+ Configuration.logger.debug "Calling API: ImagingApi#post_image_bmp ..."
24
+ end
25
+
26
+ # verify the required parameter 'bits_per_pixel' is set
27
+ fail "Missing the required parameter 'bits_per_pixel' when calling post_image_bmp" if bits_per_pixel.nil?
28
+
29
+ # verify the required parameter 'horizontal_resolution' is set
30
+ fail "Missing the required parameter 'horizontal_resolution' when calling post_image_bmp" if horizontal_resolution.nil?
31
+
32
+ # verify the required parameter 'vertical_resolution' is set
33
+ fail "Missing the required parameter 'vertical_resolution' when calling post_image_bmp" if vertical_resolution.nil?
34
+
35
+ # verify the required parameter 'file' is set
36
+ fail "Missing the required parameter 'file' when calling post_image_bmp" if file.nil?
37
+
38
+ # resource path
39
+ path = "/imaging/bmp".sub('{format}','json')
40
+
41
+ # query parameters
42
+ query_params = {}
43
+ query_params[:'bitsPerPixel'] = bits_per_pixel
44
+ query_params[:'horizontalResolution'] = horizontal_resolution
45
+ query_params[:'verticalResolution'] = vertical_resolution
46
+ query_params[:'fromScratch'] = opts[:'from_scratch'] if opts[:'from_scratch']
47
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
48
+
49
+ # header parameters
50
+ header_params = {}
51
+
52
+ # HTTP header 'Accept' (if needed)
53
+ _header_accept = ['multipart/form-data']
54
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
55
+
56
+ # HTTP header 'Content-Type'
57
+ _header_content_type = ['multipart/form-data']
58
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
59
+
60
+ # form parameters
61
+ form_params = {}
62
+ form_params["file"] = file
63
+
64
+ # http body (model)
65
+ post_body = nil
66
+
67
+
68
+ auth_names = []
69
+ result = @api_client.call_api(:POST, path,
70
+ :header_params => header_params,
71
+ :query_params => query_params,
72
+ :form_params => form_params,
73
+ :body => post_body,
74
+ :auth_names => auth_names,
75
+ :return_type => 'File')
76
+ if Configuration.debugging
77
+ Configuration.logger.debug "API called: ImagingApi#post_image_bmp. Result: #{result.inspect}"
78
+ end
79
+ return result
80
+ end
81
+
82
+ # Crop image from body
83
+ #
84
+ # @param format Output file format. Valid Formats: Bmp, png, jpg, tiff, psd, gif.
85
+ # @param x X position of start point for cropping rectangle
86
+ # @param y Y position of start point for cropping rectangle
87
+ # @param width Width of cropping rectangle
88
+ # @param height Height of cropping rectangle
89
+ # @param file
90
+ # @param [Hash] opts the optional parameters
91
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
92
+ # @return [File]
93
+ def post_crop_image(format, x, y, width, height, file, opts = {})
94
+ if Configuration.debugging
95
+ Configuration.logger.debug "Calling API: ImagingApi#post_crop_image ..."
96
+ end
97
+
98
+ # verify the required parameter 'format' is set
99
+ fail "Missing the required parameter 'format' when calling post_crop_image" if format.nil?
100
+
101
+ # verify the required parameter 'x' is set
102
+ fail "Missing the required parameter 'x' when calling post_crop_image" if x.nil?
103
+
104
+ # verify the required parameter 'y' is set
105
+ fail "Missing the required parameter 'y' when calling post_crop_image" if y.nil?
106
+
107
+ # verify the required parameter 'width' is set
108
+ fail "Missing the required parameter 'width' when calling post_crop_image" if width.nil?
109
+
110
+ # verify the required parameter 'height' is set
111
+ fail "Missing the required parameter 'height' when calling post_crop_image" if height.nil?
112
+
113
+ # verify the required parameter 'file' is set
114
+ fail "Missing the required parameter 'file' when calling post_crop_image" if file.nil?
115
+
116
+ # resource path
117
+ path = "/imaging/crop".sub('{format}','json')
118
+
119
+ # query parameters
120
+ query_params = {}
121
+ query_params[:'format'] = format
122
+ query_params[:'x'] = x
123
+ query_params[:'y'] = y
124
+ query_params[:'width'] = width
125
+ query_params[:'height'] = height
126
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
127
+
128
+ # header parameters
129
+ header_params = {}
130
+
131
+ # HTTP header 'Accept' (if needed)
132
+ _header_accept = ['multipart/form-data']
133
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
134
+
135
+ # HTTP header 'Content-Type'
136
+ _header_content_type = ['multipart/form-data']
137
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
138
+
139
+ # form parameters
140
+ form_params = {}
141
+ form_params["file"] = file
142
+
143
+ # http body (model)
144
+ post_body = nil
145
+
146
+
147
+ auth_names = []
148
+ result = @api_client.call_api(:POST, path,
149
+ :header_params => header_params,
150
+ :query_params => query_params,
151
+ :form_params => form_params,
152
+ :body => post_body,
153
+ :auth_names => auth_names,
154
+ :return_type => 'File')
155
+ if Configuration.debugging
156
+ Configuration.logger.debug "API called: ImagingApi#post_crop_image. Result: #{result.inspect}"
157
+ end
158
+ return result
159
+ end
160
+
161
+ # Update parameters of gif image.
162
+ #
163
+ # @param file
164
+ # @param [Hash] opts the optional parameters
165
+ # @option opts [String] :background_color_index Index of the background color.
166
+ # @option opts [String] :color_resolution Color resolution.
167
+ # @option opts [BOOLEAN] :has_trailer Specifies if image has trailer.
168
+ # @option opts [BOOLEAN] :interlaced Specifies if image is interlaced.
169
+ # @option opts [BOOLEAN] :is_palette_sorted Specifies if palette is sorted.
170
+ # @option opts [String] :pixel_aspect_ratio Pixel aspect ratio.
171
+ # @option opts [BOOLEAN] :from_scratch Specifies where additional parameters we do not support should be taken from. If this is true – they will be taken from default values for standard image, if it is false – they will be saved from current image. Default is false.
172
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
173
+ # @return [File]
174
+ def post_image_gif(file, opts = {})
175
+ if Configuration.debugging
176
+ Configuration.logger.debug "Calling API: ImagingApi#post_image_gif ..."
177
+ end
178
+
179
+ # verify the required parameter 'file' is set
180
+ fail "Missing the required parameter 'file' when calling post_image_gif" if file.nil?
181
+
182
+ # resource path
183
+ path = "/imaging/gif".sub('{format}','json')
184
+
185
+ # query parameters
186
+ query_params = {}
187
+ query_params[:'backgroundColorIndex'] = opts[:'background_color_index'] if opts[:'background_color_index']
188
+ query_params[:'colorResolution'] = opts[:'color_resolution'] if opts[:'color_resolution']
189
+ query_params[:'hasTrailer'] = opts[:'has_trailer'] if opts[:'has_trailer']
190
+ query_params[:'interlaced'] = opts[:'interlaced'] if opts[:'interlaced']
191
+ query_params[:'isPaletteSorted'] = opts[:'is_palette_sorted'] if opts[:'is_palette_sorted']
192
+ query_params[:'pixelAspectRatio'] = opts[:'pixel_aspect_ratio'] if opts[:'pixel_aspect_ratio']
193
+ query_params[:'fromScratch'] = opts[:'from_scratch'] if opts[:'from_scratch']
194
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
195
+
196
+ # header parameters
197
+ header_params = {}
198
+
199
+ # HTTP header 'Accept' (if needed)
200
+ _header_accept = ['multipart/form-data']
201
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
202
+
203
+ # HTTP header 'Content-Type'
204
+ _header_content_type = ['multipart/form-data']
205
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
206
+
207
+ # form parameters
208
+ form_params = {}
209
+ form_params["file"] = file
210
+
211
+ # http body (model)
212
+ post_body = nil
213
+
214
+
215
+ auth_names = []
216
+ result = @api_client.call_api(:POST, path,
217
+ :header_params => header_params,
218
+ :query_params => query_params,
219
+ :form_params => form_params,
220
+ :body => post_body,
221
+ :auth_names => auth_names,
222
+ :return_type => 'File')
223
+ if Configuration.debugging
224
+ Configuration.logger.debug "API called: ImagingApi#post_image_gif. Result: #{result.inspect}"
225
+ end
226
+ return result
227
+ end
228
+
229
+ # Update parameters of jpg image.
230
+ #
231
+ # @param file
232
+ # @param [Hash] opts the optional parameters
233
+ # @option opts [Integer] :quality Quality of image. From 0 to 100. Default is 75
234
+ # @option opts [String] :compression_type Compression type.
235
+ # @option opts [BOOLEAN] :from_scratch Specifies where additional parameters we do not support should be taken from. If this is true – they will be taken from default values for standard image, if it is false – they will be saved from current image. Default is false.
236
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
237
+ # @return [File]
238
+ def post_image_jpg(file, opts = {})
239
+ if Configuration.debugging
240
+ Configuration.logger.debug "Calling API: ImagingApi#post_image_jpg ..."
241
+ end
242
+
243
+ # verify the required parameter 'file' is set
244
+ fail "Missing the required parameter 'file' when calling post_image_jpg" if file.nil?
245
+
246
+ # resource path
247
+ path = "/imaging/jpg".sub('{format}','json')
248
+
249
+ # query parameters
250
+ query_params = {}
251
+ query_params[:'quality'] = opts[:'quality'] if opts[:'quality']
252
+ query_params[:'compressionType'] = opts[:'compression_type'] if opts[:'compression_type']
253
+ query_params[:'fromScratch'] = opts[:'from_scratch'] if opts[:'from_scratch']
254
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
255
+
256
+ # header parameters
257
+ header_params = {}
258
+
259
+ # HTTP header 'Accept' (if needed)
260
+ _header_accept = ['multipart/form-data']
261
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
262
+
263
+ # HTTP header 'Content-Type'
264
+ _header_content_type = ['multipart/form-data']
265
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
266
+
267
+ # form parameters
268
+ form_params = {}
269
+ form_params["file"] = file
270
+
271
+ # http body (model)
272
+ post_body = nil
273
+
274
+
275
+ auth_names = []
276
+ result = @api_client.call_api(:POST, path,
277
+ :header_params => header_params,
278
+ :query_params => query_params,
279
+ :form_params => form_params,
280
+ :body => post_body,
281
+ :auth_names => auth_names,
282
+ :return_type => 'File')
283
+ if Configuration.debugging
284
+ Configuration.logger.debug "API called: ImagingApi#post_image_jpg. Result: #{result.inspect}"
285
+ end
286
+ return result
287
+ end
288
+
289
+ # Update parameters of png image.
290
+ #
291
+ # @param file
292
+ # @param [Hash] opts the optional parameters
293
+ # @option opts [BOOLEAN] :from_scratch Specifies where additional parameters we do not support should be taken from. If this is true – they will be taken from default values for standard image, if it is false – they will be saved from current image. Default is false.
294
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
295
+ # @return [File]
296
+ def post_image_png(file, opts = {})
297
+ if Configuration.debugging
298
+ Configuration.logger.debug "Calling API: ImagingApi#post_image_png ..."
299
+ end
300
+
301
+ # verify the required parameter 'file' is set
302
+ fail "Missing the required parameter 'file' when calling post_image_png" if file.nil?
303
+
304
+ # resource path
305
+ path = "/imaging/png".sub('{format}','json')
306
+
307
+ # query parameters
308
+ query_params = {}
309
+ query_params[:'fromScratch'] = opts[:'from_scratch'] if opts[:'from_scratch']
310
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
311
+
312
+ # header parameters
313
+ header_params = {}
314
+
315
+ # HTTP header 'Accept' (if needed)
316
+ _header_accept = ['multipart/form-data']
317
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
318
+
319
+ # HTTP header 'Content-Type'
320
+ _header_content_type = ['multipart/form-data']
321
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
322
+
323
+ # form parameters
324
+ form_params = {}
325
+ form_params["file"] = file
326
+
327
+ # http body (model)
328
+ post_body = nil
329
+
330
+
331
+ auth_names = []
332
+ result = @api_client.call_api(:POST, path,
333
+ :header_params => header_params,
334
+ :query_params => query_params,
335
+ :form_params => form_params,
336
+ :body => post_body,
337
+ :auth_names => auth_names,
338
+ :return_type => 'File')
339
+ if Configuration.debugging
340
+ Configuration.logger.debug "API called: ImagingApi#post_image_png. Result: #{result.inspect}"
341
+ end
342
+ return result
343
+ end
344
+
345
+ # Update parameters of psd image.
346
+ #
347
+ # @param file
348
+ # @param [Hash] opts the optional parameters
349
+ # @option opts [Integer] :channels_count Count of channels.
350
+ # @option opts [String] :compression_method Compression method.
351
+ # @option opts [BOOLEAN] :from_scratch Specifies where additional parameters we do not support should be taken from. If this is true – they will be taken from default values for standard image, if it is false – they will be saved from current image. Default is false.
352
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
353
+ # @return [File]
354
+ def post_image_psd(file, opts = {})
355
+ if Configuration.debugging
356
+ Configuration.logger.debug "Calling API: ImagingApi#post_image_psd ..."
357
+ end
358
+
359
+ # verify the required parameter 'file' is set
360
+ fail "Missing the required parameter 'file' when calling post_image_psd" if file.nil?
361
+
362
+ # resource path
363
+ path = "/imaging/psd".sub('{format}','json')
364
+
365
+ # query parameters
366
+ query_params = {}
367
+ query_params[:'channelsCount'] = opts[:'channels_count'] if opts[:'channels_count']
368
+ query_params[:'compressionMethod'] = opts[:'compression_method'] if opts[:'compression_method']
369
+ query_params[:'fromScratch'] = opts[:'from_scratch'] if opts[:'from_scratch']
370
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
371
+
372
+ # header parameters
373
+ header_params = {}
374
+
375
+ # HTTP header 'Accept' (if needed)
376
+ _header_accept = ['multipart/form-data']
377
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
378
+
379
+ # HTTP header 'Content-Type'
380
+ _header_content_type = ['multipart/form-data']
381
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
382
+
383
+ # form parameters
384
+ form_params = {}
385
+ form_params["file"] = file
386
+
387
+ # http body (model)
388
+ post_body = nil
389
+
390
+
391
+ auth_names = []
392
+ result = @api_client.call_api(:POST, path,
393
+ :header_params => header_params,
394
+ :query_params => query_params,
395
+ :form_params => form_params,
396
+ :body => post_body,
397
+ :auth_names => auth_names,
398
+ :return_type => 'File')
399
+ if Configuration.debugging
400
+ Configuration.logger.debug "API called: ImagingApi#post_image_psd. Result: #{result.inspect}"
401
+ end
402
+ return result
403
+ end
404
+
405
+ # Change scale of an image from body
406
+ #
407
+ # @param format Output file format. Valid Formats: Bmp, png, jpg, tiff, psd, gif.
408
+ # @param new_width New width of the scaled image.
409
+ # @param new_height New height of the scaled image.
410
+ # @param file
411
+ # @param [Hash] opts the optional parameters
412
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
413
+ # @return [File]
414
+ def post_change_image_scale(format, new_width, new_height, file, opts = {})
415
+ if Configuration.debugging
416
+ Configuration.logger.debug "Calling API: ImagingApi#post_change_image_scale ..."
417
+ end
418
+
419
+ # verify the required parameter 'format' is set
420
+ fail "Missing the required parameter 'format' when calling post_change_image_scale" if format.nil?
421
+
422
+ # verify the required parameter 'new_width' is set
423
+ fail "Missing the required parameter 'new_width' when calling post_change_image_scale" if new_width.nil?
424
+
425
+ # verify the required parameter 'new_height' is set
426
+ fail "Missing the required parameter 'new_height' when calling post_change_image_scale" if new_height.nil?
427
+
428
+ # verify the required parameter 'file' is set
429
+ fail "Missing the required parameter 'file' when calling post_change_image_scale" if file.nil?
430
+
431
+ # resource path
432
+ path = "/imaging/resize".sub('{format}','json')
433
+
434
+ # query parameters
435
+ query_params = {}
436
+ query_params[:'format'] = format
437
+ query_params[:'newWidth'] = new_width
438
+ query_params[:'newHeight'] = new_height
439
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
440
+
441
+ # header parameters
442
+ header_params = {}
443
+
444
+ # HTTP header 'Accept' (if needed)
445
+ _header_accept = ['multipart/form-data']
446
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
447
+
448
+ # HTTP header 'Content-Type'
449
+ _header_content_type = ['multipart/form-data']
450
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
451
+
452
+ # form parameters
453
+ form_params = {}
454
+ form_params["file"] = file
455
+
456
+ # http body (model)
457
+ post_body = nil
458
+
459
+
460
+ auth_names = []
461
+ result = @api_client.call_api(:POST, path,
462
+ :header_params => header_params,
463
+ :query_params => query_params,
464
+ :form_params => form_params,
465
+ :body => post_body,
466
+ :auth_names => auth_names,
467
+ :return_type => 'File')
468
+ if Configuration.debugging
469
+ Configuration.logger.debug "API called: ImagingApi#post_change_image_scale. Result: #{result.inspect}"
470
+ end
471
+ return result
472
+ end
473
+
474
+ # Rotate and flip existing image and get it from response.
475
+ #
476
+ # @param format Number of frame. (Bmp, png, jpg, tiff, psd, gif.)
477
+ # @param method New width of the scaled image. (Rotate180FlipNone, Rotate180FlipX, Rotate180FlipXY, Rotate180FlipY, Rotate270FlipNone, Rotate270FlipX, Rotate270FlipXY, Rotate270FlipY, Rotate90FlipNone, Rotate90FlipX, Rotate90FlipXY, Rotate90FlipY, RotateNoneFlipNone, RotateNoneFlipX, RotateNoneFlipXY, RotateNoneFlipY)
478
+ # @param file
479
+ # @param [Hash] opts the optional parameters
480
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
481
+ # @return [File]
482
+ def post_image_rotate_flip(format, method, file, opts = {})
483
+ if Configuration.debugging
484
+ Configuration.logger.debug "Calling API: ImagingApi#post_image_rotate_flip ..."
485
+ end
486
+
487
+ # verify the required parameter 'format' is set
488
+ fail "Missing the required parameter 'format' when calling post_image_rotate_flip" if format.nil?
489
+
490
+ # verify the required parameter 'method' is set
491
+ fail "Missing the required parameter 'method' when calling post_image_rotate_flip" if method.nil?
492
+
493
+ # verify the required parameter 'file' is set
494
+ fail "Missing the required parameter 'file' when calling post_image_rotate_flip" if file.nil?
495
+
496
+ # resource path
497
+ path = "/imaging/rotateflip".sub('{format}','json')
498
+
499
+ # query parameters
500
+ query_params = {}
501
+ query_params[:'format'] = format
502
+ query_params[:'method'] = method
503
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
504
+
505
+ # header parameters
506
+ header_params = {}
507
+
508
+ # HTTP header 'Accept' (if needed)
509
+ _header_accept = ['multipart/form-data']
510
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
511
+
512
+ # HTTP header 'Content-Type'
513
+ _header_content_type = ['multipart/form-data']
514
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
515
+
516
+ # form parameters
517
+ form_params = {}
518
+ form_params["file"] = file
519
+
520
+ # http body (model)
521
+ post_body = nil
522
+
523
+
524
+ auth_names = []
525
+ result = @api_client.call_api(:POST, path,
526
+ :header_params => header_params,
527
+ :query_params => query_params,
528
+ :form_params => form_params,
529
+ :body => post_body,
530
+ :auth_names => auth_names,
531
+ :return_type => 'File')
532
+ if Configuration.debugging
533
+ Configuration.logger.debug "API called: ImagingApi#post_image_rotate_flip. Result: #{result.inspect}"
534
+ end
535
+ return result
536
+ end
537
+
538
+ # Export existing image to another format. Image is passed as request body.
539
+ #
540
+ # @param format Output file format. (Bmp, png, jpg, tiff, psd, gif.)
541
+ # @param file
542
+ # @param [Hash] opts the optional parameters
543
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
544
+ # @return [File]
545
+ def post_image_save_as(format, file, opts = {})
546
+ if Configuration.debugging
547
+ Configuration.logger.debug "Calling API: ImagingApi#post_image_save_as ..."
548
+ end
549
+
550
+ # verify the required parameter 'format' is set
551
+ fail "Missing the required parameter 'format' when calling post_image_save_as" if format.nil?
552
+
553
+ # verify the required parameter 'file' is set
554
+ fail "Missing the required parameter 'file' when calling post_image_save_as" if file.nil?
555
+
556
+ # resource path
557
+ path = "/imaging/saveAs".sub('{format}','json')
558
+
559
+ # query parameters
560
+ query_params = {}
561
+ query_params[:'format'] = format
562
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
563
+
564
+ # header parameters
565
+ header_params = {}
566
+
567
+ # HTTP header 'Accept' (if needed)
568
+ _header_accept = ['multipart/form-data']
569
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
570
+
571
+ # HTTP header 'Content-Type'
572
+ _header_content_type = ['multipart/form-data']
573
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
574
+
575
+ # form parameters
576
+ form_params = {}
577
+ form_params["file"] = file
578
+
579
+ # http body (model)
580
+ post_body = nil
581
+
582
+
583
+ auth_names = []
584
+ result = @api_client.call_api(:POST, path,
585
+ :header_params => header_params,
586
+ :query_params => query_params,
587
+ :form_params => form_params,
588
+ :body => post_body,
589
+ :auth_names => auth_names,
590
+ :return_type => 'File')
591
+ if Configuration.debugging
592
+ Configuration.logger.debug "API called: ImagingApi#post_image_save_as. Result: #{result.inspect}"
593
+ end
594
+ return result
595
+ end
596
+
597
+ # Update tiff image.
598
+ #
599
+ # @param file
600
+ # @param [Hash] opts the optional parameters
601
+ # @option opts [String] :compression New compression.
602
+ # @option opts [String] :resolution_unit New resolution unit.
603
+ # @option opts [Integer] :bit_depth New bit depth.
604
+ # @option opts [BOOLEAN] :from_scratch
605
+ # @option opts [Float] :horizontal_resolution New horizontal resolution.
606
+ # @option opts [Float] :vertical_resolution New verstical resolution.
607
+ # @option opts [String] :out_path Path to save result
608
+ # @return [File]
609
+ def post_process_tiff(file, opts = {})
610
+ if Configuration.debugging
611
+ Configuration.logger.debug "Calling API: ImagingApi#post_process_tiff ..."
612
+ end
613
+
614
+ # verify the required parameter 'file' is set
615
+ fail "Missing the required parameter 'file' when calling post_process_tiff" if file.nil?
616
+
617
+ # resource path
618
+ path = "/imaging/tiff".sub('{format}','json')
619
+
620
+ # query parameters
621
+ query_params = {}
622
+ query_params[:'compression'] = opts[:'compression'] if opts[:'compression']
623
+ query_params[:'resolutionUnit'] = opts[:'resolution_unit'] if opts[:'resolution_unit']
624
+ query_params[:'bitDepth'] = opts[:'bit_depth'] if opts[:'bit_depth']
625
+ query_params[:'fromScratch'] = opts[:'from_scratch'] if opts[:'from_scratch']
626
+ query_params[:'horizontalResolution'] = opts[:'horizontal_resolution'] if opts[:'horizontal_resolution']
627
+ query_params[:'verticalResolution'] = opts[:'vertical_resolution'] if opts[:'vertical_resolution']
628
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
629
+
630
+ # header parameters
631
+ header_params = {}
632
+
633
+ # HTTP header 'Accept' (if needed)
634
+ _header_accept = ['multipart/form-data']
635
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
636
+
637
+ # HTTP header 'Content-Type'
638
+ _header_content_type = ['multipart/form-data']
639
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
640
+
641
+ # form parameters
642
+ form_params = {}
643
+ form_params["file"] = file
644
+
645
+ # http body (model)
646
+ post_body = nil
647
+
648
+
649
+ auth_names = []
650
+ result = @api_client.call_api(:POST, path,
651
+ :header_params => header_params,
652
+ :query_params => query_params,
653
+ :form_params => form_params,
654
+ :body => post_body,
655
+ :auth_names => auth_names,
656
+ :return_type => 'File')
657
+ if Configuration.debugging
658
+ Configuration.logger.debug "API called: ImagingApi#post_process_tiff. Result: #{result.inspect}"
659
+ end
660
+ return result
661
+ end
662
+
663
+ # Append tiff image.
664
+ #
665
+ # @param name Original image name.
666
+ # @param [Hash] opts the optional parameters
667
+ # @option opts [String] :append_file Second image file name.
668
+ # @option opts [String] :storage The images storage.
669
+ # @option opts [String] :folder The images folder.
670
+ # @return [BaseResponse]
671
+ def post_tiff_append(name, opts = {})
672
+ if Configuration.debugging
673
+ Configuration.logger.debug "Calling API: ImagingApi#post_tiff_append ..."
674
+ end
675
+
676
+ # verify the required parameter 'name' is set
677
+ fail "Missing the required parameter 'name' when calling post_tiff_append" if name.nil?
678
+
679
+ # resource path
680
+ path = "/imaging/tiff/{name}/appendTiff".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
681
+
682
+ # query parameters
683
+ query_params = {}
684
+ query_params[:'appendFile'] = opts[:'append_file'] if opts[:'append_file']
685
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
686
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
687
+
688
+ # header parameters
689
+ header_params = {}
690
+
691
+ # HTTP header 'Accept' (if needed)
692
+ _header_accept = ['application/json', 'text/json', 'application/xml', 'text/xml', 'text/javascript']
693
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
694
+
695
+ # HTTP header 'Content-Type'
696
+ _header_content_type = []
697
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
698
+
699
+ # form parameters
700
+ form_params = {}
701
+
702
+ # http body (model)
703
+ post_body = nil
704
+
705
+
706
+ auth_names = []
707
+ result = @api_client.call_api(:POST, path,
708
+ :header_params => header_params,
709
+ :query_params => query_params,
710
+ :form_params => form_params,
711
+ :body => post_body,
712
+ :auth_names => auth_names,
713
+ :return_type => 'BaseResponse')
714
+ if Configuration.debugging
715
+ Configuration.logger.debug "API called: ImagingApi#post_tiff_append. Result: #{result.inspect}"
716
+ end
717
+ return result
718
+ end
719
+
720
+ # Get tiff image for fax.
721
+ #
722
+ # @param name The image file name.
723
+ # @param [Hash] opts the optional parameters
724
+ # @option opts [String] :storage The image file storage.
725
+ # @option opts [String] :folder The image file folder.
726
+ # @option opts [String] :out_path Path to save result
727
+ # @return [File]
728
+ def get_tiff_to_fax(name, opts = {})
729
+ if Configuration.debugging
730
+ Configuration.logger.debug "Calling API: ImagingApi#get_tiff_to_fax ..."
731
+ end
732
+
733
+ # verify the required parameter 'name' is set
734
+ fail "Missing the required parameter 'name' when calling get_tiff_to_fax" if name.nil?
735
+
736
+ # resource path
737
+ path = "/imaging/tiff/{name}/toFax".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
738
+
739
+ # query parameters
740
+ query_params = {}
741
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
742
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
743
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
744
+
745
+ # header parameters
746
+ header_params = {}
747
+
748
+ # HTTP header 'Accept' (if needed)
749
+ _header_accept = ['multipart/form-data']
750
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
751
+
752
+ # HTTP header 'Content-Type'
753
+ _header_content_type = []
754
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
755
+
756
+ # form parameters
757
+ form_params = {}
758
+
759
+ # http body (model)
760
+ post_body = nil
761
+
762
+
763
+ auth_names = []
764
+ result = @api_client.call_api(:GET, path,
765
+ :header_params => header_params,
766
+ :query_params => query_params,
767
+ :form_params => form_params,
768
+ :body => post_body,
769
+ :auth_names => auth_names,
770
+ :return_type => 'File')
771
+ if Configuration.debugging
772
+ Configuration.logger.debug "API called: ImagingApi#get_tiff_to_fax. Result: #{result.inspect}"
773
+ end
774
+ return result
775
+ end
776
+
777
+ # Perform scaling, cropping and flipping of an image in single request. Image is passed as request body.
778
+ #
779
+ # @param format Save image in another format. By default format remains the same
780
+ # @param new_width New Width of the scaled image.
781
+ # @param new_height New height of the scaled image.
782
+ # @param x X position of start point for cropping rectangle
783
+ # @param y Y position of start point for cropping rectangle
784
+ # @param rect_width Width of cropping rectangle
785
+ # @param rect_height Height of cropping rectangle
786
+ # @param rotate_flip_method RotateFlip method. Default is RotateNoneFlipNone.
787
+ # @param file
788
+ # @param [Hash] opts the optional parameters
789
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
790
+ # @return [File]
791
+ def post_image_save_as_1(format, new_width, new_height, x, y, rect_width, rect_height, rotate_flip_method, file, opts = {})
792
+ if Configuration.debugging
793
+ Configuration.logger.debug "Calling API: ImagingApi#post_image_save_as_1 ..."
794
+ end
795
+
796
+ # verify the required parameter 'format' is set
797
+ fail "Missing the required parameter 'format' when calling post_image_save_as_1" if format.nil?
798
+
799
+ # verify the required parameter 'new_width' is set
800
+ fail "Missing the required parameter 'new_width' when calling post_image_save_as_1" if new_width.nil?
801
+
802
+ # verify the required parameter 'new_height' is set
803
+ fail "Missing the required parameter 'new_height' when calling post_image_save_as_1" if new_height.nil?
804
+
805
+ # verify the required parameter 'x' is set
806
+ fail "Missing the required parameter 'x' when calling post_image_save_as_1" if x.nil?
807
+
808
+ # verify the required parameter 'y' is set
809
+ fail "Missing the required parameter 'y' when calling post_image_save_as_1" if y.nil?
810
+
811
+ # verify the required parameter 'rect_width' is set
812
+ fail "Missing the required parameter 'rect_width' when calling post_image_save_as_1" if rect_width.nil?
813
+
814
+ # verify the required parameter 'rect_height' is set
815
+ fail "Missing the required parameter 'rect_height' when calling post_image_save_as_1" if rect_height.nil?
816
+
817
+ # verify the required parameter 'rotate_flip_method' is set
818
+ fail "Missing the required parameter 'rotate_flip_method' when calling post_image_save_as_1" if rotate_flip_method.nil?
819
+
820
+ # verify the required parameter 'file' is set
821
+ fail "Missing the required parameter 'file' when calling post_image_save_as_1" if file.nil?
822
+
823
+ # resource path
824
+ path = "/imaging/updateImage".sub('{format}','json')
825
+
826
+ # query parameters
827
+ query_params = {}
828
+ query_params[:'format'] = format
829
+ query_params[:'newWidth'] = new_width
830
+ query_params[:'newHeight'] = new_height
831
+ query_params[:'x'] = x
832
+ query_params[:'y'] = y
833
+ query_params[:'rectWidth'] = rect_width
834
+ query_params[:'rectHeight'] = rect_height
835
+ query_params[:'rotateFlipMethod'] = rotate_flip_method
836
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
837
+
838
+ # header parameters
839
+ header_params = {}
840
+
841
+ # HTTP header 'Accept' (if needed)
842
+ _header_accept = ['multipart/form-data']
843
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
844
+
845
+ # HTTP header 'Content-Type'
846
+ _header_content_type = ['multipart/form-data']
847
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
848
+
849
+ # form parameters
850
+ form_params = {}
851
+ form_params["file"] = file
852
+
853
+ # http body (model)
854
+ post_body = nil
855
+
856
+
857
+ auth_names = []
858
+ result = @api_client.call_api(:POST, path,
859
+ :header_params => header_params,
860
+ :query_params => query_params,
861
+ :form_params => form_params,
862
+ :body => post_body,
863
+ :auth_names => auth_names,
864
+ :return_type => 'File')
865
+ if Configuration.debugging
866
+ Configuration.logger.debug "API called: ImagingApi#post_image_save_as_1. Result: #{result.inspect}"
867
+ end
868
+ return result
869
+ end
870
+
871
+ # Update parameters of bmp image.
872
+ #
873
+ # @param name Filename of image.
874
+ # @param bits_per_pixel Color depth.
875
+ # @param horizontal_resolution New horizontal resolution.
876
+ # @param vertical_resolution New vertical resolution.
877
+ # @param [Hash] opts the optional parameters
878
+ # @option opts [BOOLEAN] :from_scratch Specifies where additional parameters we do not support should be taken from. If this is true – they will be taken from default values for standard image, if it is false – they will be saved from current image. Default is false.
879
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
880
+ # @option opts [String] :folder Folder with image to process.
881
+ # @option opts [String] :storage
882
+ # @return [File]
883
+ def get_image_bmp(name, bits_per_pixel, horizontal_resolution, vertical_resolution, opts = {})
884
+ if Configuration.debugging
885
+ Configuration.logger.debug "Calling API: ImagingApi#get_image_bmp ..."
886
+ end
887
+
888
+ # verify the required parameter 'name' is set
889
+ fail "Missing the required parameter 'name' when calling get_image_bmp" if name.nil?
890
+
891
+ # verify the required parameter 'bits_per_pixel' is set
892
+ fail "Missing the required parameter 'bits_per_pixel' when calling get_image_bmp" if bits_per_pixel.nil?
893
+
894
+ # verify the required parameter 'horizontal_resolution' is set
895
+ fail "Missing the required parameter 'horizontal_resolution' when calling get_image_bmp" if horizontal_resolution.nil?
896
+
897
+ # verify the required parameter 'vertical_resolution' is set
898
+ fail "Missing the required parameter 'vertical_resolution' when calling get_image_bmp" if vertical_resolution.nil?
899
+
900
+ # resource path
901
+ path = "/imaging/{name}/bmp".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
902
+
903
+ # query parameters
904
+ query_params = {}
905
+ query_params[:'bitsPerPixel'] = bits_per_pixel
906
+ query_params[:'horizontalResolution'] = horizontal_resolution
907
+ query_params[:'verticalResolution'] = vertical_resolution
908
+ query_params[:'fromScratch'] = opts[:'from_scratch'] if opts[:'from_scratch']
909
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
910
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
911
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
912
+
913
+ # header parameters
914
+ header_params = {}
915
+
916
+ # HTTP header 'Accept' (if needed)
917
+ _header_accept = ['multipart/form-data']
918
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
919
+
920
+ # HTTP header 'Content-Type'
921
+ _header_content_type = []
922
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
923
+
924
+ # form parameters
925
+ form_params = {}
926
+
927
+ # http body (model)
928
+ post_body = nil
929
+
930
+
931
+ auth_names = []
932
+ result = @api_client.call_api(:GET, path,
933
+ :header_params => header_params,
934
+ :query_params => query_params,
935
+ :form_params => form_params,
936
+ :body => post_body,
937
+ :auth_names => auth_names,
938
+ :return_type => 'File')
939
+ if Configuration.debugging
940
+ Configuration.logger.debug "API called: ImagingApi#get_image_bmp. Result: #{result.inspect}"
941
+ end
942
+ return result
943
+ end
944
+
945
+ # Crop existing image
946
+ #
947
+ # @param name The image name.
948
+ # @param format Output file format. Valid Formats: Bmp, png, jpg, tiff, psd, gif.
949
+ # @param x X position of start point for cropping rectangle
950
+ # @param y Y position of start point for cropping rectangle
951
+ # @param width Width of cropping rectangle
952
+ # @param height Height of cropping rectangle
953
+ # @param [Hash] opts the optional parameters
954
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
955
+ # @option opts [String] :folder Folder with image to process.
956
+ # @option opts [String] :storage
957
+ # @return [File]
958
+ def get_crop_image(name, format, x, y, width, height, opts = {})
959
+ if Configuration.debugging
960
+ Configuration.logger.debug "Calling API: ImagingApi#get_crop_image ..."
961
+ end
962
+
963
+ # verify the required parameter 'name' is set
964
+ fail "Missing the required parameter 'name' when calling get_crop_image" if name.nil?
965
+
966
+ # verify the required parameter 'format' is set
967
+ fail "Missing the required parameter 'format' when calling get_crop_image" if format.nil?
968
+
969
+ # verify the required parameter 'x' is set
970
+ fail "Missing the required parameter 'x' when calling get_crop_image" if x.nil?
971
+
972
+ # verify the required parameter 'y' is set
973
+ fail "Missing the required parameter 'y' when calling get_crop_image" if y.nil?
974
+
975
+ # verify the required parameter 'width' is set
976
+ fail "Missing the required parameter 'width' when calling get_crop_image" if width.nil?
977
+
978
+ # verify the required parameter 'height' is set
979
+ fail "Missing the required parameter 'height' when calling get_crop_image" if height.nil?
980
+
981
+ # resource path
982
+ path = "/imaging/{name}/crop".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
983
+
984
+ # query parameters
985
+ query_params = {}
986
+ query_params[:'format'] = format
987
+ query_params[:'x'] = x
988
+ query_params[:'y'] = y
989
+ query_params[:'width'] = width
990
+ query_params[:'height'] = height
991
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
992
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
993
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
994
+
995
+ # header parameters
996
+ header_params = {}
997
+
998
+ # HTTP header 'Accept' (if needed)
999
+ _header_accept = ['multipart/form-data']
1000
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1001
+
1002
+ # HTTP header 'Content-Type'
1003
+ _header_content_type = []
1004
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1005
+
1006
+ # form parameters
1007
+ form_params = {}
1008
+
1009
+ # http body (model)
1010
+ post_body = nil
1011
+
1012
+
1013
+ auth_names = []
1014
+ result = @api_client.call_api(:GET, path,
1015
+ :header_params => header_params,
1016
+ :query_params => query_params,
1017
+ :form_params => form_params,
1018
+ :body => post_body,
1019
+ :auth_names => auth_names,
1020
+ :return_type => 'File')
1021
+ if Configuration.debugging
1022
+ Configuration.logger.debug "API called: ImagingApi#get_crop_image. Result: #{result.inspect}"
1023
+ end
1024
+ return result
1025
+ end
1026
+
1027
+ # Get separate frame of tiff image
1028
+ #
1029
+ # @param name Filename of image.
1030
+ # @param frame_id Number of frame.
1031
+ # @param [Hash] opts the optional parameters
1032
+ # @option opts [Integer] :new_width New width of the scaled image.
1033
+ # @option opts [Integer] :new_height New height of the scaled image.
1034
+ # @option opts [Integer] :x X position of start point for cropping rectangle
1035
+ # @option opts [Integer] :y Y position of start point for cropping rectangle
1036
+ # @option opts [Integer] :rect_width Width of cropping rectangle
1037
+ # @option opts [Integer] :rect_height Height of cropping rectangle
1038
+ # @option opts [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.)
1039
+ # @option opts [BOOLEAN] :save_other_frames Include all other frames or just specified frame in response.
1040
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
1041
+ # @option opts [String] :folder Folder with image to process.
1042
+ # @option opts [String] :storage
1043
+ # @return [File]
1044
+ def get_image_frame(name, frame_id, opts = {})
1045
+ if Configuration.debugging
1046
+ Configuration.logger.debug "Calling API: ImagingApi#get_image_frame ..."
1047
+ end
1048
+
1049
+ # verify the required parameter 'name' is set
1050
+ fail "Missing the required parameter 'name' when calling get_image_frame" if name.nil?
1051
+
1052
+ # verify the required parameter 'frame_id' is set
1053
+ fail "Missing the required parameter 'frame_id' when calling get_image_frame" if frame_id.nil?
1054
+
1055
+ # resource path
1056
+ path = "/imaging/{name}/frames/{frameId}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'frameId' + '}', frame_id.to_s)
1057
+
1058
+ # query parameters
1059
+ query_params = {}
1060
+ query_params[:'newWidth'] = opts[:'new_width'] if opts[:'new_width']
1061
+ query_params[:'newHeight'] = opts[:'new_height'] if opts[:'new_height']
1062
+ query_params[:'x'] = opts[:'x'] if opts[:'x']
1063
+ query_params[:'y'] = opts[:'y'] if opts[:'y']
1064
+ query_params[:'rectWidth'] = opts[:'rect_width'] if opts[:'rect_width']
1065
+ query_params[:'rectHeight'] = opts[:'rect_height'] if opts[:'rect_height']
1066
+ query_params[:'rotateFlipMethod'] = opts[:'rotate_flip_method'] if opts[:'rotate_flip_method']
1067
+ query_params[:'saveOtherFrames'] = opts[:'save_other_frames'] if opts[:'save_other_frames']
1068
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
1069
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1070
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1071
+
1072
+ # header parameters
1073
+ header_params = {}
1074
+
1075
+ # HTTP header 'Accept' (if needed)
1076
+ _header_accept = ['multipart/form-data']
1077
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1078
+
1079
+ # HTTP header 'Content-Type'
1080
+ _header_content_type = []
1081
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1082
+
1083
+ # form parameters
1084
+ form_params = {}
1085
+
1086
+ # http body (model)
1087
+ post_body = nil
1088
+
1089
+
1090
+ auth_names = []
1091
+ result = @api_client.call_api(:GET, path,
1092
+ :header_params => header_params,
1093
+ :query_params => query_params,
1094
+ :form_params => form_params,
1095
+ :body => post_body,
1096
+ :auth_names => auth_names,
1097
+ :return_type => 'File')
1098
+ if Configuration.debugging
1099
+ Configuration.logger.debug "API called: ImagingApi#get_image_frame. Result: #{result.inspect}"
1100
+ end
1101
+ return result
1102
+ end
1103
+
1104
+ # Get properties of a tiff frame.
1105
+ #
1106
+ # @param name Filename with image.
1107
+ # @param frame_id Number of frame.
1108
+ # @param [Hash] opts the optional parameters
1109
+ # @option opts [String] :folder Folder with image to process.
1110
+ # @option opts [String] :storage
1111
+ # @return [ImagingResponse]
1112
+ def get_image_frame_properties(name, frame_id, opts = {})
1113
+ if Configuration.debugging
1114
+ Configuration.logger.debug "Calling API: ImagingApi#get_image_frame_properties ..."
1115
+ end
1116
+
1117
+ # verify the required parameter 'name' is set
1118
+ fail "Missing the required parameter 'name' when calling get_image_frame_properties" if name.nil?
1119
+
1120
+ # verify the required parameter 'frame_id' is set
1121
+ fail "Missing the required parameter 'frame_id' when calling get_image_frame_properties" if frame_id.nil?
1122
+
1123
+ # resource path
1124
+ path = "/imaging/{name}/frames/{frameId}/properties".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'frameId' + '}', frame_id.to_s)
1125
+
1126
+ # query parameters
1127
+ query_params = {}
1128
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1129
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1130
+
1131
+ # header parameters
1132
+ header_params = {}
1133
+
1134
+ # HTTP header 'Accept' (if needed)
1135
+ _header_accept = ['application/json', 'text/json', 'application/xml', 'text/xml', 'text/javascript']
1136
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1137
+
1138
+ # HTTP header 'Content-Type'
1139
+ _header_content_type = []
1140
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1141
+
1142
+ # form parameters
1143
+ form_params = {}
1144
+
1145
+ # http body (model)
1146
+ post_body = nil
1147
+
1148
+
1149
+ auth_names = []
1150
+ result = @api_client.call_api(:GET, path,
1151
+ :header_params => header_params,
1152
+ :query_params => query_params,
1153
+ :form_params => form_params,
1154
+ :body => post_body,
1155
+ :auth_names => auth_names,
1156
+ :return_type => 'ImagingResponse')
1157
+ if Configuration.debugging
1158
+ Configuration.logger.debug "API called: ImagingApi#get_image_frame_properties. Result: #{result.inspect}"
1159
+ end
1160
+ return result
1161
+ end
1162
+
1163
+ # Update parameters of bmp image.
1164
+ #
1165
+ # @param name Filename of image.
1166
+ # @param [Hash] opts the optional parameters
1167
+ # @option opts [String] :background_color_index Index of the background color.
1168
+ # @option opts [String] :color_resolution Color resolution.
1169
+ # @option opts [BOOLEAN] :has_trailer Specifies if image has trailer.
1170
+ # @option opts [BOOLEAN] :interlaced Specifies if image is interlaced.
1171
+ # @option opts [BOOLEAN] :is_palette_sorted Specifies if palette is sorted.
1172
+ # @option opts [String] :pixel_aspect_ratio Pixel aspect ratio.
1173
+ # @option opts [BOOLEAN] :from_scratch Specifies where additional parameters we do not support should be taken from. If this is true – they will be taken from default values for standard image, if it is false – they will be saved from current image. Default is false.
1174
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
1175
+ # @option opts [String] :folder Folder with image to process.
1176
+ # @option opts [String] :storage
1177
+ # @return [File]
1178
+ def get_image_gif(name, opts = {})
1179
+ if Configuration.debugging
1180
+ Configuration.logger.debug "Calling API: ImagingApi#get_image_gif ..."
1181
+ end
1182
+
1183
+ # verify the required parameter 'name' is set
1184
+ fail "Missing the required parameter 'name' when calling get_image_gif" if name.nil?
1185
+
1186
+ # resource path
1187
+ path = "/imaging/{name}/gif".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
1188
+
1189
+ # query parameters
1190
+ query_params = {}
1191
+ query_params[:'backgroundColorIndex'] = opts[:'background_color_index'] if opts[:'background_color_index']
1192
+ query_params[:'colorResolution'] = opts[:'color_resolution'] if opts[:'color_resolution']
1193
+ query_params[:'hasTrailer'] = opts[:'has_trailer'] if opts[:'has_trailer']
1194
+ query_params[:'interlaced'] = opts[:'interlaced'] if opts[:'interlaced']
1195
+ query_params[:'isPaletteSorted'] = opts[:'is_palette_sorted'] if opts[:'is_palette_sorted']
1196
+ query_params[:'pixelAspectRatio'] = opts[:'pixel_aspect_ratio'] if opts[:'pixel_aspect_ratio']
1197
+ query_params[:'fromScratch'] = opts[:'from_scratch'] if opts[:'from_scratch']
1198
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
1199
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1200
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1201
+
1202
+ # header parameters
1203
+ header_params = {}
1204
+
1205
+ # HTTP header 'Accept' (if needed)
1206
+ _header_accept = ['multipart/form-data']
1207
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1208
+
1209
+ # HTTP header 'Content-Type'
1210
+ _header_content_type = []
1211
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1212
+
1213
+ # form parameters
1214
+ form_params = {}
1215
+
1216
+ # http body (model)
1217
+ post_body = nil
1218
+
1219
+
1220
+ auth_names = []
1221
+ result = @api_client.call_api(:GET, path,
1222
+ :header_params => header_params,
1223
+ :query_params => query_params,
1224
+ :form_params => form_params,
1225
+ :body => post_body,
1226
+ :auth_names => auth_names,
1227
+ :return_type => 'File')
1228
+ if Configuration.debugging
1229
+ Configuration.logger.debug "API called: ImagingApi#get_image_gif. Result: #{result.inspect}"
1230
+ end
1231
+ return result
1232
+ end
1233
+
1234
+ # Update parameters of jpg image.
1235
+ #
1236
+ # @param name Filename of image.
1237
+ # @param [Hash] opts the optional parameters
1238
+ # @option opts [Integer] :quality Quality of image. From 0 to 100. Default is 75
1239
+ # @option opts [String] :compression_type Compression type.
1240
+ # @option opts [BOOLEAN] :from_scratch Specifies where additional parameters we do not support should be taken from. If this is true – they will be taken from default values for standard image, if it is false – they will be saved from current image. Default is false.
1241
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
1242
+ # @option opts [String] :folder Folder with image to process.
1243
+ # @option opts [String] :storage
1244
+ # @return [File]
1245
+ def get_image_jpg(name, opts = {})
1246
+ if Configuration.debugging
1247
+ Configuration.logger.debug "Calling API: ImagingApi#get_image_jpg ..."
1248
+ end
1249
+
1250
+ # verify the required parameter 'name' is set
1251
+ fail "Missing the required parameter 'name' when calling get_image_jpg" if name.nil?
1252
+
1253
+ # resource path
1254
+ path = "/imaging/{name}/jpg".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
1255
+
1256
+ # query parameters
1257
+ query_params = {}
1258
+ query_params[:'quality'] = opts[:'quality'] if opts[:'quality']
1259
+ query_params[:'compressionType'] = opts[:'compression_type'] if opts[:'compression_type']
1260
+ query_params[:'fromScratch'] = opts[:'from_scratch'] if opts[:'from_scratch']
1261
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
1262
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1263
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1264
+
1265
+ # header parameters
1266
+ header_params = {}
1267
+
1268
+ # HTTP header 'Accept' (if needed)
1269
+ _header_accept = ['multipart/form-data']
1270
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1271
+
1272
+ # HTTP header 'Content-Type'
1273
+ _header_content_type = []
1274
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1275
+
1276
+ # form parameters
1277
+ form_params = {}
1278
+
1279
+ # http body (model)
1280
+ post_body = nil
1281
+
1282
+
1283
+ auth_names = []
1284
+ result = @api_client.call_api(:GET, path,
1285
+ :header_params => header_params,
1286
+ :query_params => query_params,
1287
+ :form_params => form_params,
1288
+ :body => post_body,
1289
+ :auth_names => auth_names,
1290
+ :return_type => 'File')
1291
+ if Configuration.debugging
1292
+ Configuration.logger.debug "API called: ImagingApi#get_image_jpg. Result: #{result.inspect}"
1293
+ end
1294
+ return result
1295
+ end
1296
+
1297
+ # Update parameters of png image.
1298
+ #
1299
+ # @param name Filename of image.
1300
+ # @param [Hash] opts the optional parameters
1301
+ # @option opts [BOOLEAN] :from_scratch Specifies where additional parameters we do not support should be taken from. If this is true – they will be taken from default values for standard image, if it is false – they will be saved from current image. Default is false.
1302
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
1303
+ # @option opts [String] :folder Folder with image to process.
1304
+ # @option opts [String] :storage
1305
+ # @return [File]
1306
+ def get_image_png(name, opts = {})
1307
+ if Configuration.debugging
1308
+ Configuration.logger.debug "Calling API: ImagingApi#get_image_png ..."
1309
+ end
1310
+
1311
+ # verify the required parameter 'name' is set
1312
+ fail "Missing the required parameter 'name' when calling get_image_png" if name.nil?
1313
+
1314
+ # resource path
1315
+ path = "/imaging/{name}/png".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
1316
+
1317
+ # query parameters
1318
+ query_params = {}
1319
+ query_params[:'fromScratch'] = opts[:'from_scratch'] if opts[:'from_scratch']
1320
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
1321
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1322
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1323
+
1324
+ # header parameters
1325
+ header_params = {}
1326
+
1327
+ # HTTP header 'Accept' (if needed)
1328
+ _header_accept = ['multipart/form-data']
1329
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1330
+
1331
+ # HTTP header 'Content-Type'
1332
+ _header_content_type = []
1333
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1334
+
1335
+ # form parameters
1336
+ form_params = {}
1337
+
1338
+ # http body (model)
1339
+ post_body = nil
1340
+
1341
+
1342
+ auth_names = []
1343
+ result = @api_client.call_api(:GET, path,
1344
+ :header_params => header_params,
1345
+ :query_params => query_params,
1346
+ :form_params => form_params,
1347
+ :body => post_body,
1348
+ :auth_names => auth_names,
1349
+ :return_type => 'File')
1350
+ if Configuration.debugging
1351
+ Configuration.logger.debug "API called: ImagingApi#get_image_png. Result: #{result.inspect}"
1352
+ end
1353
+ return result
1354
+ end
1355
+
1356
+ # Get properties of an image.
1357
+ #
1358
+ # @param name The image name.
1359
+ # @param [Hash] opts the optional parameters
1360
+ # @option opts [String] :folder Folder with image to process.
1361
+ # @option opts [String] :storage
1362
+ # @return [ImagingResponse]
1363
+ def get_image_properties(name, opts = {})
1364
+ if Configuration.debugging
1365
+ Configuration.logger.debug "Calling API: ImagingApi#get_image_properties ..."
1366
+ end
1367
+
1368
+ # verify the required parameter 'name' is set
1369
+ fail "Missing the required parameter 'name' when calling get_image_properties" if name.nil?
1370
+
1371
+ # resource path
1372
+ path = "/imaging/{name}/properties".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
1373
+
1374
+ # query parameters
1375
+ query_params = {}
1376
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1377
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1378
+
1379
+ # header parameters
1380
+ header_params = {}
1381
+
1382
+ # HTTP header 'Accept' (if needed)
1383
+ _header_accept = ['application/json', 'text/json', 'application/xml', 'text/xml', 'text/javascript']
1384
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1385
+
1386
+ # HTTP header 'Content-Type'
1387
+ _header_content_type = []
1388
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1389
+
1390
+ # form parameters
1391
+ form_params = {}
1392
+
1393
+ # http body (model)
1394
+ post_body = nil
1395
+
1396
+
1397
+ auth_names = []
1398
+ result = @api_client.call_api(:GET, path,
1399
+ :header_params => header_params,
1400
+ :query_params => query_params,
1401
+ :form_params => form_params,
1402
+ :body => post_body,
1403
+ :auth_names => auth_names,
1404
+ :return_type => 'ImagingResponse')
1405
+ if Configuration.debugging
1406
+ Configuration.logger.debug "API called: ImagingApi#get_image_properties. Result: #{result.inspect}"
1407
+ end
1408
+ return result
1409
+ end
1410
+
1411
+ # Update parameters of psd image.
1412
+ #
1413
+ # @param name Filename of image.
1414
+ # @param [Hash] opts the optional parameters
1415
+ # @option opts [Integer] :channels_count Count of channels.
1416
+ # @option opts [String] :compression_method Compression method.
1417
+ # @option opts [BOOLEAN] :from_scratch Specifies where additional parameters we do not support should be taken from. If this is true – they will be taken from default values for standard image, if it is false – they will be saved from current image. Default is false.
1418
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
1419
+ # @option opts [String] :folder Folder with image to process.
1420
+ # @option opts [String] :storage
1421
+ # @return [File]
1422
+ def get_image_psd(name, opts = {})
1423
+ if Configuration.debugging
1424
+ Configuration.logger.debug "Calling API: ImagingApi#get_image_psd ..."
1425
+ end
1426
+
1427
+ # verify the required parameter 'name' is set
1428
+ fail "Missing the required parameter 'name' when calling get_image_psd" if name.nil?
1429
+
1430
+ # resource path
1431
+ path = "/imaging/{name}/psd".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
1432
+
1433
+ # query parameters
1434
+ query_params = {}
1435
+ query_params[:'channelsCount'] = opts[:'channels_count'] if opts[:'channels_count']
1436
+ query_params[:'compressionMethod'] = opts[:'compression_method'] if opts[:'compression_method']
1437
+ query_params[:'fromScratch'] = opts[:'from_scratch'] if opts[:'from_scratch']
1438
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
1439
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1440
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1441
+
1442
+ # header parameters
1443
+ header_params = {}
1444
+
1445
+ # HTTP header 'Accept' (if needed)
1446
+ _header_accept = ['multipart/form-data']
1447
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1448
+
1449
+ # HTTP header 'Content-Type'
1450
+ _header_content_type = []
1451
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1452
+
1453
+ # form parameters
1454
+ form_params = {}
1455
+
1456
+ # http body (model)
1457
+ post_body = nil
1458
+
1459
+
1460
+ auth_names = []
1461
+ result = @api_client.call_api(:GET, path,
1462
+ :header_params => header_params,
1463
+ :query_params => query_params,
1464
+ :form_params => form_params,
1465
+ :body => post_body,
1466
+ :auth_names => auth_names,
1467
+ :return_type => 'File')
1468
+ if Configuration.debugging
1469
+ Configuration.logger.debug "API called: ImagingApi#get_image_psd. Result: #{result.inspect}"
1470
+ end
1471
+ return result
1472
+ end
1473
+
1474
+ # Change scale of an existing image
1475
+ #
1476
+ # @param name The image name.
1477
+ # @param format Output file format. Valid Formats: Bmp, png, jpg, tiff, psd, gif.
1478
+ # @param new_width New width of the scaled image.
1479
+ # @param new_height New height of the scaled image.
1480
+ # @param [Hash] opts the optional parameters
1481
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
1482
+ # @option opts [String] :folder Folder with image to process.
1483
+ # @option opts [String] :storage
1484
+ # @return [File]
1485
+ def get_change_image_scale(name, format, new_width, new_height, opts = {})
1486
+ if Configuration.debugging
1487
+ Configuration.logger.debug "Calling API: ImagingApi#get_change_image_scale ..."
1488
+ end
1489
+
1490
+ # verify the required parameter 'name' is set
1491
+ fail "Missing the required parameter 'name' when calling get_change_image_scale" if name.nil?
1492
+
1493
+ # verify the required parameter 'format' is set
1494
+ fail "Missing the required parameter 'format' when calling get_change_image_scale" if format.nil?
1495
+
1496
+ # verify the required parameter 'new_width' is set
1497
+ fail "Missing the required parameter 'new_width' when calling get_change_image_scale" if new_width.nil?
1498
+
1499
+ # verify the required parameter 'new_height' is set
1500
+ fail "Missing the required parameter 'new_height' when calling get_change_image_scale" if new_height.nil?
1501
+
1502
+ # resource path
1503
+ path = "/imaging/{name}/resize".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
1504
+
1505
+ # query parameters
1506
+ query_params = {}
1507
+ query_params[:'format'] = format
1508
+ query_params[:'newWidth'] = new_width
1509
+ query_params[:'newHeight'] = new_height
1510
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
1511
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1512
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1513
+
1514
+ # header parameters
1515
+ header_params = {}
1516
+
1517
+ # HTTP header 'Accept' (if needed)
1518
+ _header_accept = ['multipart/form-data']
1519
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1520
+
1521
+ # HTTP header 'Content-Type'
1522
+ _header_content_type = []
1523
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1524
+
1525
+ # form parameters
1526
+ form_params = {}
1527
+
1528
+ # http body (model)
1529
+ post_body = nil
1530
+
1531
+
1532
+ auth_names = []
1533
+ result = @api_client.call_api(:GET, path,
1534
+ :header_params => header_params,
1535
+ :query_params => query_params,
1536
+ :form_params => form_params,
1537
+ :body => post_body,
1538
+ :auth_names => auth_names,
1539
+ :return_type => 'File')
1540
+ if Configuration.debugging
1541
+ Configuration.logger.debug "API called: ImagingApi#get_change_image_scale. Result: #{result.inspect}"
1542
+ end
1543
+ return result
1544
+ end
1545
+
1546
+ # Rotate and flip existing image
1547
+ #
1548
+ # @param name Filename of image.
1549
+ # @param format Number of frame. (Bmp, png, jpg, tiff, psd, gif.)
1550
+ # @param method New width of the scaled image. (Rotate180FlipNone, Rotate180FlipX, Rotate180FlipXY, Rotate180FlipY, Rotate270FlipNone, Rotate270FlipX, Rotate270FlipXY, Rotate270FlipY, Rotate90FlipNone, Rotate90FlipX, Rotate90FlipXY, Rotate90FlipY, RotateNoneFlipNone, RotateNoneFlipX, RotateNoneFlipXY, RotateNoneFlipY)
1551
+ # @param [Hash] opts the optional parameters
1552
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
1553
+ # @option opts [String] :folder Folder with image to process.
1554
+ # @option opts [String] :storage
1555
+ # @return [File]
1556
+ def get_image_rotate_flip(name, format, method, opts = {})
1557
+ if Configuration.debugging
1558
+ Configuration.logger.debug "Calling API: ImagingApi#get_image_rotate_flip ..."
1559
+ end
1560
+
1561
+ # verify the required parameter 'name' is set
1562
+ fail "Missing the required parameter 'name' when calling get_image_rotate_flip" if name.nil?
1563
+
1564
+ # verify the required parameter 'format' is set
1565
+ fail "Missing the required parameter 'format' when calling get_image_rotate_flip" if format.nil?
1566
+
1567
+ # verify the required parameter 'method' is set
1568
+ fail "Missing the required parameter 'method' when calling get_image_rotate_flip" if method.nil?
1569
+
1570
+ # resource path
1571
+ path = "/imaging/{name}/rotateflip".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
1572
+
1573
+ # query parameters
1574
+ query_params = {}
1575
+ query_params[:'format'] = format
1576
+ query_params[:'method'] = method
1577
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
1578
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1579
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1580
+
1581
+ # header parameters
1582
+ header_params = {}
1583
+
1584
+ # HTTP header 'Accept' (if needed)
1585
+ _header_accept = ['multipart/form-data']
1586
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1587
+
1588
+ # HTTP header 'Content-Type'
1589
+ _header_content_type = []
1590
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1591
+
1592
+ # form parameters
1593
+ form_params = {}
1594
+
1595
+ # http body (model)
1596
+ post_body = nil
1597
+
1598
+
1599
+ auth_names = []
1600
+ result = @api_client.call_api(:GET, path,
1601
+ :header_params => header_params,
1602
+ :query_params => query_params,
1603
+ :form_params => form_params,
1604
+ :body => post_body,
1605
+ :auth_names => auth_names,
1606
+ :return_type => 'File')
1607
+ if Configuration.debugging
1608
+ Configuration.logger.debug "API called: ImagingApi#get_image_rotate_flip. Result: #{result.inspect}"
1609
+ end
1610
+ return result
1611
+ end
1612
+
1613
+ # Export existing image to another format
1614
+ #
1615
+ # @param name Filename of image.
1616
+ # @param format Output file format. (Bmp, png, jpg, tiff, psd, gif.)
1617
+ # @param [Hash] opts the optional parameters
1618
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
1619
+ # @option opts [String] :folder Folder with image to process.
1620
+ # @option opts [String] :storage
1621
+ # @return [File]
1622
+ def get_image_save_as(name, format, opts = {})
1623
+ if Configuration.debugging
1624
+ Configuration.logger.debug "Calling API: ImagingApi#get_image_save_as ..."
1625
+ end
1626
+
1627
+ # verify the required parameter 'name' is set
1628
+ fail "Missing the required parameter 'name' when calling get_image_save_as" if name.nil?
1629
+
1630
+ # verify the required parameter 'format' is set
1631
+ fail "Missing the required parameter 'format' when calling get_image_save_as" if format.nil?
1632
+
1633
+ # resource path
1634
+ path = "/imaging/{name}/saveAs".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
1635
+
1636
+ # query parameters
1637
+ query_params = {}
1638
+ query_params[:'format'] = format
1639
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
1640
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1641
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1642
+
1643
+ # header parameters
1644
+ header_params = {}
1645
+
1646
+ # HTTP header 'Accept' (if needed)
1647
+ _header_accept = ['multipart/form-data']
1648
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1649
+
1650
+ # HTTP header 'Content-Type'
1651
+ _header_content_type = []
1652
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1653
+
1654
+ # form parameters
1655
+ form_params = {}
1656
+
1657
+ # http body (model)
1658
+ post_body = nil
1659
+
1660
+
1661
+ auth_names = []
1662
+ result = @api_client.call_api(:GET, path,
1663
+ :header_params => header_params,
1664
+ :query_params => query_params,
1665
+ :form_params => form_params,
1666
+ :body => post_body,
1667
+ :auth_names => auth_names,
1668
+ :return_type => 'File')
1669
+ if Configuration.debugging
1670
+ Configuration.logger.debug "API called: ImagingApi#get_image_save_as. Result: #{result.inspect}"
1671
+ end
1672
+ return result
1673
+ end
1674
+
1675
+ # Perform scaling, cropping and flipping of an image in single request.
1676
+ #
1677
+ # @param name Filename of image.
1678
+ # @param format Save image in another format. By default format remains the same
1679
+ # @param new_width New Width of the scaled image.
1680
+ # @param new_height New height of the scaled image.
1681
+ # @param x X position of start point for cropping rectangle
1682
+ # @param y Y position of start point for cropping rectangle
1683
+ # @param rect_width Width of cropping rectangle
1684
+ # @param rect_height Height of cropping rectangle
1685
+ # @param rotate_flip_method RotateFlip method. Default is RotateNoneFlipNone.
1686
+ # @param [Hash] opts the optional parameters
1687
+ # @option opts [String] :out_path Path to updated file, if this is empty, response contains streamed image.
1688
+ # @option opts [String] :folder Folder with image to process.
1689
+ # @option opts [String] :storage
1690
+ # @return [File]
1691
+ def get_updated_image(name, format, new_width, new_height, x, y, rect_width, rect_height, rotate_flip_method, opts = {})
1692
+ if Configuration.debugging
1693
+ Configuration.logger.debug "Calling API: ImagingApi#get_updated_image ..."
1694
+ end
1695
+
1696
+ # verify the required parameter 'name' is set
1697
+ fail "Missing the required parameter 'name' when calling get_updated_image" if name.nil?
1698
+
1699
+ # verify the required parameter 'format' is set
1700
+ fail "Missing the required parameter 'format' when calling get_updated_image" if format.nil?
1701
+
1702
+ # verify the required parameter 'new_width' is set
1703
+ fail "Missing the required parameter 'new_width' when calling get_updated_image" if new_width.nil?
1704
+
1705
+ # verify the required parameter 'new_height' is set
1706
+ fail "Missing the required parameter 'new_height' when calling get_updated_image" if new_height.nil?
1707
+
1708
+ # verify the required parameter 'x' is set
1709
+ fail "Missing the required parameter 'x' when calling get_updated_image" if x.nil?
1710
+
1711
+ # verify the required parameter 'y' is set
1712
+ fail "Missing the required parameter 'y' when calling get_updated_image" if y.nil?
1713
+
1714
+ # verify the required parameter 'rect_width' is set
1715
+ fail "Missing the required parameter 'rect_width' when calling get_updated_image" if rect_width.nil?
1716
+
1717
+ # verify the required parameter 'rect_height' is set
1718
+ fail "Missing the required parameter 'rect_height' when calling get_updated_image" if rect_height.nil?
1719
+
1720
+ # verify the required parameter 'rotate_flip_method' is set
1721
+ fail "Missing the required parameter 'rotate_flip_method' when calling get_updated_image" if rotate_flip_method.nil?
1722
+
1723
+ # resource path
1724
+ path = "/imaging/{name}/updateImage".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
1725
+
1726
+ # query parameters
1727
+ query_params = {}
1728
+ query_params[:'format'] = format
1729
+ query_params[:'newWidth'] = new_width
1730
+ query_params[:'newHeight'] = new_height
1731
+ query_params[:'x'] = x
1732
+ query_params[:'y'] = y
1733
+ query_params[:'rectWidth'] = rect_width
1734
+ query_params[:'rectHeight'] = rect_height
1735
+ query_params[:'rotateFlipMethod'] = rotate_flip_method
1736
+ query_params[:'outPath'] = opts[:'out_path'] if opts[:'out_path']
1737
+ query_params[:'folder'] = opts[:'folder'] if opts[:'folder']
1738
+ query_params[:'storage'] = opts[:'storage'] if opts[:'storage']
1739
+
1740
+ # header parameters
1741
+ header_params = {}
1742
+
1743
+ # HTTP header 'Accept' (if needed)
1744
+ _header_accept = ['multipart/form-data']
1745
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
1746
+
1747
+ # HTTP header 'Content-Type'
1748
+ _header_content_type = []
1749
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
1750
+
1751
+ # form parameters
1752
+ form_params = {}
1753
+
1754
+ # http body (model)
1755
+ post_body = nil
1756
+
1757
+
1758
+ auth_names = []
1759
+ result = @api_client.call_api(:GET, path,
1760
+ :header_params => header_params,
1761
+ :query_params => query_params,
1762
+ :form_params => form_params,
1763
+ :body => post_body,
1764
+ :auth_names => auth_names,
1765
+ :return_type => 'File')
1766
+ if Configuration.debugging
1767
+ Configuration.logger.debug "API called: ImagingApi#get_updated_image. Result: #{result.inspect}"
1768
+ end
1769
+ return result
1770
+ end
1771
+ end
1772
+ end
1773
+
1774
+
1775
+
1776
+