aspose_imaging_cloud 1.0.0 → 19.12
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -1,55 +0,0 @@
|
|
1
|
-
module AsposeImagingCloud
|
2
|
-
#
|
3
|
-
class TiffProperties < BaseObject
|
4
|
-
attr_accessor :frames, :byte_order, :exif_data
|
5
|
-
# attribute mapping from ruby-style variable name to JSON key
|
6
|
-
def self.attribute_map
|
7
|
-
{
|
8
|
-
|
9
|
-
#
|
10
|
-
:'frames' => :'Frames',
|
11
|
-
|
12
|
-
#
|
13
|
-
:'byte_order' => :'ByteOrder',
|
14
|
-
|
15
|
-
#
|
16
|
-
:'exif_data' => :'ExifData'
|
17
|
-
|
18
|
-
}
|
19
|
-
end
|
20
|
-
|
21
|
-
# attribute type
|
22
|
-
def self.swagger_types
|
23
|
-
{
|
24
|
-
:'frames' => :'Array<TiffFrame>',
|
25
|
-
:'byte_order' => :'String',
|
26
|
-
:'exif_data' => :'ExifData'
|
27
|
-
|
28
|
-
}
|
29
|
-
end
|
30
|
-
|
31
|
-
def initialize(attributes = {})
|
32
|
-
return if !attributes.is_a?(Hash) || attributes.empty?
|
33
|
-
|
34
|
-
# convert string to symbol for hash key
|
35
|
-
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
36
|
-
|
37
|
-
|
38
|
-
if attributes[:'Frames']
|
39
|
-
if (value = attributes[:'Frames']).is_a?(Array)
|
40
|
-
self.frames = value
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
if attributes[:'ByteOrder']
|
45
|
-
self.byte_order = attributes[:'ByteOrder']
|
46
|
-
end
|
47
|
-
|
48
|
-
if attributes[:'ExifData']
|
49
|
-
self.exif_data = attributes[:'ExifData']
|
50
|
-
end
|
51
|
-
|
52
|
-
end
|
53
|
-
|
54
|
-
end
|
55
|
-
end
|
data/test/data/TestDemo.tif
DELETED
Binary file
|
data/test/data/aspose.jpg
DELETED
Binary file
|
Binary file
|
data/test/data/demo.tif
DELETED
Binary file
|
data/test/data/sample-multi.tif
DELETED
Binary file
|
data/test/data/sample.bmp
DELETED
Binary file
|
data/test/data/sample.gif
DELETED
Binary file
|
data/test/data/sample.psd
DELETED
Binary file
|
data/test/data/sample.tif
DELETED
Binary file
|
data/test/data/test.bmp
DELETED
Binary file
|
data/test/imaging_tests.rb
DELETED
@@ -1,291 +0,0 @@
|
|
1
|
-
require "minitest/autorun"
|
2
|
-
require "minitest/unit"
|
3
|
-
|
4
|
-
require_relative '../lib/aspose_imaging_cloud'
|
5
|
-
|
6
|
-
class ImagingTests < Minitest::Test
|
7
|
-
include MiniTest::Assertions
|
8
|
-
include AsposeImagingCloud
|
9
|
-
include AsposeStorageCloud
|
10
|
-
|
11
|
-
def setup
|
12
|
-
#Get App key and App SID from https://cloud.aspose.com
|
13
|
-
AsposeApp.app_key_and_sid("", "")
|
14
|
-
@imaging_api = ImagingApi.new
|
15
|
-
end
|
16
|
-
|
17
|
-
def teardown
|
18
|
-
end
|
19
|
-
|
20
|
-
def upload_file(file_name)
|
21
|
-
@storage_api = StorageApi.new
|
22
|
-
response = @storage_api.put_create(file_name, File.open("data/" << file_name,"r") { |io| io.read } )
|
23
|
-
assert(response, message="Failed to upload {file_name} file.")
|
24
|
-
end
|
25
|
-
|
26
|
-
def test_post_image_bmp
|
27
|
-
bits_per_pixel = 24
|
28
|
-
horizontal_resolution = 300
|
29
|
-
vertical_resolution = 300
|
30
|
-
file_name = "sample.bmp"
|
31
|
-
file = File.open("data/" << file_name,"r") { |io| io.read }
|
32
|
-
|
33
|
-
response = @imaging_api.post_image_bmp(bits_per_pixel, horizontal_resolution, vertical_resolution, file)
|
34
|
-
assert(response, message="Failed to update parameters of bmp image.")
|
35
|
-
end
|
36
|
-
|
37
|
-
def test_post_crop_image
|
38
|
-
format = "png"
|
39
|
-
x = 30
|
40
|
-
y = 40
|
41
|
-
width = 100
|
42
|
-
height = 100
|
43
|
-
file_name = "aspose.jpg"
|
44
|
-
file = File.open("data/" << file_name,"r") { |io| io.read }
|
45
|
-
|
46
|
-
response = @imaging_api.post_crop_image(format, x, y, width, height, file)
|
47
|
-
assert(response, message="Failed to crop image from body")
|
48
|
-
end
|
49
|
-
|
50
|
-
def test_post_image_gif
|
51
|
-
file_name = "sample.gif"
|
52
|
-
file = File.open("data/" << file_name,"r") { |io| io.read }
|
53
|
-
opts = {background_color_index: "255", color_resolution: "7"}
|
54
|
-
|
55
|
-
response = @imaging_api.post_image_gif(file, opts)
|
56
|
-
assert(response, message="Failed to update parameters of gif image.")
|
57
|
-
end
|
58
|
-
|
59
|
-
def test_post_image_jpg
|
60
|
-
file_name = "aspose.jpg"
|
61
|
-
file = File.open("data/" << file_name,"r") { |io| io.read }
|
62
|
-
opts = {quality: 100, compression_type: "progressive"}
|
63
|
-
|
64
|
-
response = @imaging_api.post_image_jpg(file, opts)
|
65
|
-
assert(response, message="Failed to update parameters of jpg image.")
|
66
|
-
end
|
67
|
-
|
68
|
-
def test_post_image_png
|
69
|
-
file_name = "aspose_imaging_for_cloud.png"
|
70
|
-
file = File.open("data/" << file_name,"r") { |io| io.read }
|
71
|
-
opts = {from_scratch: true}
|
72
|
-
|
73
|
-
response = @imaging_api.post_image_png(file, opts)
|
74
|
-
assert(response, message="Failed to update parameters of png image.")
|
75
|
-
end
|
76
|
-
|
77
|
-
def test_post_image_psd
|
78
|
-
file_name = "sample.psd"
|
79
|
-
file = File.open("data/" << file_name,"r") { |io| io.read }
|
80
|
-
opts = {channels_count: 3, compression_method: "rle"}
|
81
|
-
|
82
|
-
response = @imaging_api.post_image_psd(file, opts)
|
83
|
-
assert(response, message="Failed to update parameters of psd image.")
|
84
|
-
end
|
85
|
-
|
86
|
-
def test_post_change_image_scale
|
87
|
-
format = "jpg"
|
88
|
-
new_width = 200
|
89
|
-
new_height = 200
|
90
|
-
file_name = "aspose_imaging_for_cloud.png"
|
91
|
-
file = File.open("data/" << file_name,"r") { |io| io.read }
|
92
|
-
|
93
|
-
response = @imaging_api.post_change_image_scale(format, new_width, new_height, file)
|
94
|
-
assert(response, message="Failed to change scale of an image from body.")
|
95
|
-
end
|
96
|
-
|
97
|
-
def test_post_image_rotate_flip
|
98
|
-
format = "png"
|
99
|
-
method = "Rotate180FlipX"
|
100
|
-
file_name = "aspose.jpg"
|
101
|
-
file = File.open("data/" << file_name,"r") { |io| io.read }
|
102
|
-
|
103
|
-
response = @imaging_api.post_image_rotate_flip(format, method, file)
|
104
|
-
assert(response, message="Failed to rotate and flip existing image.")
|
105
|
-
end
|
106
|
-
|
107
|
-
def test_post_image_save_as
|
108
|
-
format = "png"
|
109
|
-
file_name = "aspose.jpg"
|
110
|
-
file = File.open("data/" << file_name,"r") { |io| io.read }
|
111
|
-
|
112
|
-
response = @imaging_api.post_image_save_as(format, file)
|
113
|
-
assert(response, message="Failed to export existing image to another format.")
|
114
|
-
end
|
115
|
-
|
116
|
-
def test_post_process_tiff
|
117
|
-
file_name = "demo.tif"
|
118
|
-
file = File.open("data/" << file_name,"r") { |io| io.read }
|
119
|
-
opts = {compression: "ccittfax3", resolution_unit: "inch", bit_depth: 1}
|
120
|
-
|
121
|
-
response = @imaging_api.post_process_tiff(file, opts)
|
122
|
-
assert(response, message="Failed to update tiff image.")
|
123
|
-
end
|
124
|
-
|
125
|
-
def test_post_tiff_append
|
126
|
-
file_name = "sample.tif"
|
127
|
-
upload_file(file_name)
|
128
|
-
append_file = "TestDemo.tif"
|
129
|
-
upload_file(append_file)
|
130
|
-
opts = {append_file: append_file}
|
131
|
-
|
132
|
-
response = @imaging_api.post_tiff_append(file_name, opts)
|
133
|
-
assert(response, message="Failed to append tiff image.")
|
134
|
-
end
|
135
|
-
|
136
|
-
def test_get_tiff_to_fax
|
137
|
-
file_name = "TestDemo.tif"
|
138
|
-
upload_file(file_name)
|
139
|
-
|
140
|
-
response = @imaging_api.get_tiff_to_fax(file_name)
|
141
|
-
assert(response, message="Failed to get tiff image for fax.")
|
142
|
-
end
|
143
|
-
|
144
|
-
def test_post_image_save_as_1
|
145
|
-
format = "png"
|
146
|
-
new_width = 300
|
147
|
-
new_height = 300
|
148
|
-
x = 96
|
149
|
-
y = 96
|
150
|
-
rect_width = 200
|
151
|
-
rect_height = 200
|
152
|
-
rotate_flip_method = ""
|
153
|
-
file_name = "TestDemo.tif"
|
154
|
-
file = File.open("data/" << file_name,"r") { |io| io.read }
|
155
|
-
|
156
|
-
response = @imaging_api.post_image_save_as_1(format, new_width, new_height, x, y, rect_width, rect_height, rotate_flip_method, file)
|
157
|
-
assert(response, message="Failed to perform scaling, cropping and flipping of an image in single request.")
|
158
|
-
end
|
159
|
-
|
160
|
-
def test_get_image_bmp
|
161
|
-
file_name = "sample.bmp"
|
162
|
-
upload_file(file_name)
|
163
|
-
bits_per_pixel = 24
|
164
|
-
horizontal_resolution = 300
|
165
|
-
vertical_resolution = 300
|
166
|
-
|
167
|
-
response = @imaging_api.get_image_bmp(file_name, bits_per_pixel, horizontal_resolution, vertical_resolution)
|
168
|
-
assert(response, message="Failed to update parameters of bmp image.")
|
169
|
-
end
|
170
|
-
|
171
|
-
def test_get_crop_image
|
172
|
-
file_name = "aspose.jpg"
|
173
|
-
upload_file(file_name)
|
174
|
-
format = "png"
|
175
|
-
x = 30
|
176
|
-
y = 40
|
177
|
-
width = 100
|
178
|
-
height = 100
|
179
|
-
|
180
|
-
response = @imaging_api.get_crop_image(file_name, format, x, y, width, height)
|
181
|
-
assert(response, message="Failed to crop existing image.")
|
182
|
-
end
|
183
|
-
|
184
|
-
def test_get_image_frame
|
185
|
-
file_name = "sample-multi.tif"
|
186
|
-
upload_file(file_name)
|
187
|
-
frame_id = 1
|
188
|
-
|
189
|
-
response = @imaging_api.get_image_frame(file_name, frame_id)
|
190
|
-
assert(response, message="Failed to get separate frame of tiff image.")
|
191
|
-
end
|
192
|
-
|
193
|
-
def test_get_image_frame_properties
|
194
|
-
file_name = "TestDemo.tif"
|
195
|
-
upload_file(file_name)
|
196
|
-
frame_id = 0
|
197
|
-
|
198
|
-
response = @imaging_api.get_image_frame_properties(file_name, frame_id)
|
199
|
-
assert(response, message="Failed to get properties of a tiff frame.")
|
200
|
-
end
|
201
|
-
|
202
|
-
def test_get_image_gif
|
203
|
-
file_name = "sample.gif"
|
204
|
-
upload_file(file_name)
|
205
|
-
|
206
|
-
response = @imaging_api.get_image_gif(file_name)
|
207
|
-
assert(response, message="Failed to update parameters of GIF image.")
|
208
|
-
end
|
209
|
-
|
210
|
-
def test_get_image_jpg
|
211
|
-
file_name = "aspose.jpg"
|
212
|
-
upload_file(file_name)
|
213
|
-
opts = {quality: 100, compression_type: "progressive"}
|
214
|
-
|
215
|
-
response = @imaging_api.get_image_jpg(file_name, opts)
|
216
|
-
assert(response, message="Failed to update parameters of jpg image.")
|
217
|
-
end
|
218
|
-
|
219
|
-
def test_get_image_png
|
220
|
-
file_name = "aspose_imaging_for_cloud.png"
|
221
|
-
upload_file(file_name)
|
222
|
-
opts = {from_scratch: true}
|
223
|
-
|
224
|
-
response = @imaging_api.get_image_png(file_name, opts)
|
225
|
-
assert(response, message="Failed to update parameters of png image.")
|
226
|
-
end
|
227
|
-
|
228
|
-
def test_get_image_properties
|
229
|
-
file_name = "demo.tif"
|
230
|
-
upload_file(file_name)
|
231
|
-
|
232
|
-
response = @imaging_api.get_image_properties(file_name)
|
233
|
-
assert(response, message="Failed to get properties of an image.")
|
234
|
-
end
|
235
|
-
|
236
|
-
def test_get_image_psd
|
237
|
-
file_name = "sample.psd"
|
238
|
-
upload_file(file_name)
|
239
|
-
opts = {channels_count: 3, compression_method: "rle"}
|
240
|
-
|
241
|
-
response = @imaging_api.get_image_psd(file_name, opts)
|
242
|
-
assert(response, message="Failed to update parameters of psd image.")
|
243
|
-
end
|
244
|
-
|
245
|
-
def test_get_change_image_scale
|
246
|
-
file_name = "aspose_imaging_for_cloud.png"
|
247
|
-
upload_file(file_name)
|
248
|
-
format = "jpg"
|
249
|
-
new_width = 200
|
250
|
-
new_height = 200
|
251
|
-
|
252
|
-
response = @imaging_api.get_change_image_scale(file_name, format, new_width, new_height)
|
253
|
-
assert(response, message="Failed to change scale of an existing image.")
|
254
|
-
end
|
255
|
-
|
256
|
-
def test_get_image_rotate_flip
|
257
|
-
file_name = "aspose.jpg"
|
258
|
-
upload_file(file_name)
|
259
|
-
format = "png"
|
260
|
-
method = "Rotate180FlipX"
|
261
|
-
|
262
|
-
response = @imaging_api.get_image_rotate_flip(file_name, format, method)
|
263
|
-
assert(response, message="Failed to rotate and flip existing image")
|
264
|
-
end
|
265
|
-
|
266
|
-
def test_get_image_save_as
|
267
|
-
file_name = "aspose.jpg"
|
268
|
-
upload_file(file_name)
|
269
|
-
format = "png"
|
270
|
-
|
271
|
-
response = @imaging_api.get_image_save_as(file_name, format)
|
272
|
-
assert(response, message="Failed to export existing image to another format.")
|
273
|
-
end
|
274
|
-
|
275
|
-
def test_get_updated_image
|
276
|
-
file_name = "TestDemo.tif"
|
277
|
-
upload_file(file_name)
|
278
|
-
format = "png"
|
279
|
-
new_width = 300
|
280
|
-
new_height = 300
|
281
|
-
x = 96
|
282
|
-
y = 96
|
283
|
-
rect_width = 200
|
284
|
-
rect_height = 200
|
285
|
-
rotate_flip_method = ""
|
286
|
-
|
287
|
-
response = @imaging_api.get_updated_image(file_name, format, new_width, new_height, x, y, rect_width, rect_height, rotate_flip_method)
|
288
|
-
assert(response, message="Failed to perform scaling, cropping and flipping of an image in single request.")
|
289
|
-
end
|
290
|
-
|
291
|
-
end
|