| 1 | package AsposeImagingCloud::ImagingApi; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | require 5.6.0; | |||||||||
| 4 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 1 | ▶ | use Exporter; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 1 | ▶ | use Carp qw( croak ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | ▶ | use Log::Any qw($log); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | ▶ | use File::Slurp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 1 | ▶ | use AsposeImagingCloud::ApiClient; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | 1 | ▶ | use AsposeImagingCloud::Configuration; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | |||||||||||
| 15 | 1 | my $VERSION = '1.02'; | |||||||||
| 16 | |||||||||||
| 17 | 0 | ▶ | sub new { | ||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 18 | 0 | my $class = shift; | |||||||||
| 19 | 0 | ▶ | my $default_api_client = $AsposeImagingCloud::Configuration::api_client ? $AsposeImagingCloud::Configuration::api_client : | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | AsposeImagingCloud::ApiClient->new; | ||||||||||
| 21 | 0 | my (%self) = ( | |||||||||
| 22 | 'api_client' => $default_api_client, | ||||||||||
| 23 | @_ | ||||||||||
| 24 | ); | ||||||||||
| 25 | |||||||||||
| 26 | #my $self = { | ||||||||||
| 27 | # #api_client => $options->{api_client} | ||||||||||
| 28 | # api_client => $default_api_client | ||||||||||
| 29 | #}; | ||||||||||
| 30 | |||||||||||
| 31 | 0 | bless \%self, $class; | |||||||||
| 32 | |||||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | # | ||||||||||
| 36 | # PostImageBmp | ||||||||||
| 37 | # | ||||||||||
| 38 | # Update parameters of bmp image. | ||||||||||
| 39 | # | ||||||||||
| 40 | # @param String $bitsPerPixel Color depth. (required) | ||||||||||
| 41 | # @param String $horizontalResolution New horizontal resolution. (required) | ||||||||||
| 42 | # @param String $verticalResolution New vertical resolution. (required) | ||||||||||
| 43 | # @param Boolean $fromScratch 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. (optional) | ||||||||||
| 44 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 45 | # @param File $file (required) | ||||||||||
| 46 | # @return ResponseMessage | ||||||||||
| 47 | # | ||||||||||
| 48 | 0 | ▶ | sub PostImageBmp { | ||||||||
|
Subroutine
PostImageBmp: not called CC=14 SCAR=53.5
Pod
undocumented
| |||||||||||
| 49 | 0 | my ($self, %args) = @_; | |||||||||
| 50 | |||||||||||
| 51 | |||||||||||
| 52 | # verify the required parameter 'bitsPerPixel' is set | ||||||||||
| 53 | 0 | ▶ | unless (exists $args{'bitsPerPixel'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 54 | 0 | croak("Missing the required parameter 'bitsPerPixel' when calling PostImageBmp"); | |||||||||
| 55 | } | ||||||||||
| 56 | |||||||||||
| 57 | # verify the required parameter 'horizontalResolution' is set | ||||||||||
| 58 | 0 | ▶ | unless (exists $args{'horizontalResolution'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 59 | 0 | croak("Missing the required parameter 'horizontalResolution' when calling PostImageBmp"); | |||||||||
| 60 | } | ||||||||||
| 61 | |||||||||||
| 62 | # verify the required parameter 'verticalResolution' is set | ||||||||||
| 63 | 0 | ▶ | unless (exists $args{'verticalResolution'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 64 | 0 | croak("Missing the required parameter 'verticalResolution' when calling PostImageBmp"); | |||||||||
| 65 | } | ||||||||||
| 66 | |||||||||||
| 67 | # verify the required parameter 'file' is set | ||||||||||
| 68 | 0 | ▶ | unless (exists $args{'file'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 69 | 0 | croak("Missing the required parameter 'file' when calling PostImageBmp"); | |||||||||
| 70 | } | ||||||||||
| 71 | |||||||||||
| 72 | |||||||||||
| 73 | # parse inputs | ||||||||||
| 74 | 0 | my $_resource_path = '/imaging/bmp/?appSid={appSid}&bitsPerPixel={bitsPerPixel}&horizontalResolution={horizontalResolution}&verticalResolution={verticalResolution}&fromScratch={fromScratch}&outPath={outPath}'; | |||||||||
| 75 | |||||||||||
| 76 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 77 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 78 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 79 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 80 | |||||||||||
| 81 | 0 | my $_method = 'POST'; | |||||||||
| 82 | 0 | my $query_params = {}; | |||||||||
| 83 | 0 | my $header_params = {}; | |||||||||
| 84 | 0 | my $form_params = {}; | |||||||||
| 85 | |||||||||||
| 86 | # 'Accept' and 'Content-Type' header | ||||||||||
| 87 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 88 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 89 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 90 | } | ||||||||||
| 91 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('multipart/form-data'); | |||||||||
| 92 | |||||||||||
| 93 | # query params | ||||||||||
| 94 | 0 | ▶ | if ( exists $args{'bitsPerPixel'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 95 | 0 | $_resource_path =~ s/\Q{bitsPerPixel}\E/$args{'bitsPerPixel'}/g; | |||||||||
| 96 | }else{ | ||||||||||
| 97 | 0 | $_resource_path =~ s/[?&]bitsPerPixel.*?(?=&|\?|$)//g; | |||||||||
| 98 | }# query params | ||||||||||
| 99 | 0 | ▶ | if ( exists $args{'horizontalResolution'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 100 | 0 | $_resource_path =~ s/\Q{horizontalResolution}\E/$args{'horizontalResolution'}/g; | |||||||||
| 101 | }else{ | ||||||||||
| 102 | 0 | $_resource_path =~ s/[?&]horizontalResolution.*?(?=&|\?|$)//g; | |||||||||
| 103 | }# query params | ||||||||||
| 104 | 0 | ▶ | if ( exists $args{'verticalResolution'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 105 | 0 | $_resource_path =~ s/\Q{verticalResolution}\E/$args{'verticalResolution'}/g; | |||||||||
| 106 | }else{ | ||||||||||
| 107 | 0 | $_resource_path =~ s/[?&]verticalResolution.*?(?=&|\?|$)//g; | |||||||||
| 108 | }# query params | ||||||||||
| 109 | 0 | ▶ | if ( exists $args{'fromScratch'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 110 | 0 | $_resource_path =~ s/\Q{fromScratch}\E/$args{'fromScratch'}/g; | |||||||||
| 111 | }else{ | ||||||||||
| 112 | 0 | $_resource_path =~ s/[?&]fromScratch.*?(?=&|\?|$)//g; | |||||||||
| 113 | }# query params | ||||||||||
| 114 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 115 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 116 | }else{ | ||||||||||
| 117 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 118 | } | ||||||||||
| 119 | |||||||||||
| 120 | |||||||||||
| 121 | 0 | my $_body_data; | |||||||||
| 122 | # form params | ||||||||||
| 123 | 0 | ▶ | if ( exists $args{'file'} ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 124 | |||||||||||
| 125 | 0 | $_body_data = read_file( $args{'file'} , binmode => ':raw' ); | |||||||||
| 126 | |||||||||||
| 127 | |||||||||||
| 128 | } | ||||||||||
| 129 | |||||||||||
| 130 | |||||||||||
| 131 | |||||||||||
| 132 | # authentication setting, if any | ||||||||||
| 133 | 0 | my $auth_settings = []; | |||||||||
| 134 | |||||||||||
| 135 | # make the API Call | ||||||||||
| 136 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 137 | $query_params, $form_params, | ||||||||||
| 138 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 139 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 140 | 0 | return; | |||||||||
| 141 | } | ||||||||||
| 142 | |||||||||||
| 143 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 144 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 145 | } | ||||||||||
| 146 | |||||||||||
| 147 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 148 | 0 | return $_response_object; | |||||||||
| 149 | |||||||||||
| 150 | } | ||||||||||
| 151 | # | ||||||||||
| 152 | # PostCropImage | ||||||||||
| 153 | # | ||||||||||
| 154 | # Crop image from body | ||||||||||
| 155 | # | ||||||||||
| 156 | # @param String $format Output file format. Valid Formats: Bmp, png, jpg, tiff, psd, gif. (required) | ||||||||||
| 157 | # @param String $x X position of start point for cropping rectangle (required) | ||||||||||
| 158 | # @param String $y Y position of start point for cropping rectangle (required) | ||||||||||
| 159 | # @param String $width Width of cropping rectangle (required) | ||||||||||
| 160 | # @param String $height Height of cropping rectangle (required) | ||||||||||
| 161 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 162 | # @param File $file (required) | ||||||||||
| 163 | # @return ResponseMessage | ||||||||||
| 164 | # | ||||||||||
| 165 | 0 | ▶ | sub PostCropImage { | ||||||||
|
Subroutine
PostCropImage: not called CC=17 SCAR=57.2
Pod
undocumented
| |||||||||||
| 166 | 0 | my ($self, %args) = @_; | |||||||||
| 167 | |||||||||||
| 168 | |||||||||||
| 169 | # verify the required parameter 'format' is set | ||||||||||
| 170 | 0 | ▶ | unless (exists $args{'format'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 171 | 0 | croak("Missing the required parameter 'format' when calling PostCropImage"); | |||||||||
| 172 | } | ||||||||||
| 173 | |||||||||||
| 174 | # verify the required parameter 'x' is set | ||||||||||
| 175 | 0 | ▶ | unless (exists $args{'x'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 176 | 0 | croak("Missing the required parameter 'x' when calling PostCropImage"); | |||||||||
| 177 | } | ||||||||||
| 178 | |||||||||||
| 179 | # verify the required parameter 'y' is set | ||||||||||
| 180 | 0 | ▶ | unless (exists $args{'y'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 181 | 0 | croak("Missing the required parameter 'y' when calling PostCropImage"); | |||||||||
| 182 | } | ||||||||||
| 183 | |||||||||||
| 184 | # verify the required parameter 'width' is set | ||||||||||
| 185 | 0 | ▶ | unless (exists $args{'width'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 186 | 0 | croak("Missing the required parameter 'width' when calling PostCropImage"); | |||||||||
| 187 | } | ||||||||||
| 188 | |||||||||||
| 189 | # verify the required parameter 'height' is set | ||||||||||
| 190 | 0 | ▶ | unless (exists $args{'height'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 191 | 0 | croak("Missing the required parameter 'height' when calling PostCropImage"); | |||||||||
| 192 | } | ||||||||||
| 193 | |||||||||||
| 194 | # verify the required parameter 'file' is set | ||||||||||
| 195 | 0 | ▶ | unless (exists $args{'file'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 196 | 0 | croak("Missing the required parameter 'file' when calling PostCropImage"); | |||||||||
| 197 | } | ||||||||||
| 198 | |||||||||||
| 199 | |||||||||||
| 200 | # parse inputs | ||||||||||
| 201 | 0 | my $_resource_path = '/imaging/crop/?appSid={appSid}&toFormat={toFormat}&x={x}&y={y}&width={width}&height={height}&outPath={outPath}'; | |||||||||
| 202 | |||||||||||
| 203 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 204 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 205 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 206 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 207 | |||||||||||
| 208 | 0 | my $_method = 'POST'; | |||||||||
| 209 | 0 | my $query_params = {}; | |||||||||
| 210 | 0 | my $header_params = {}; | |||||||||
| 211 | 0 | my $form_params = {}; | |||||||||
| 212 | |||||||||||
| 213 | # 'Accept' and 'Content-Type' header | ||||||||||
| 214 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 215 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 216 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 217 | } | ||||||||||
| 218 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('multipart/form-data'); | |||||||||
| 219 | |||||||||||
| 220 | # query params | ||||||||||
| 221 | 0 | ▶ | if ( exists $args{'format'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 222 | 0 | $_resource_path =~ s/\Q{format}\E/$args{'format'}/g; | |||||||||
| 223 | }else{ | ||||||||||
| 224 | 0 | $_resource_path =~ s/[?&]format.*?(?=&|\?|$)//g; | |||||||||
| 225 | }# query params | ||||||||||
| 226 | 0 | ▶ | if ( exists $args{'x'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 227 | 0 | $_resource_path =~ s/\Q{x}\E/$args{'x'}/g; | |||||||||
| 228 | }else{ | ||||||||||
| 229 | 0 | $_resource_path =~ s/[?&]x.*?(?=&|\?|$)//g; | |||||||||
| 230 | }# query params | ||||||||||
| 231 | 0 | ▶ | if ( exists $args{'y'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 232 | 0 | $_resource_path =~ s/\Q{y}\E/$args{'y'}/g; | |||||||||
| 233 | }else{ | ||||||||||
| 234 | 0 | $_resource_path =~ s/[?&]y.*?(?=&|\?|$)//g; | |||||||||
| 235 | }# query params | ||||||||||
| 236 | 0 | ▶ | if ( exists $args{'width'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 237 | 0 | $_resource_path =~ s/\Q{width}\E/$args{'width'}/g; | |||||||||
| 238 | }else{ | ||||||||||
| 239 | 0 | $_resource_path =~ s/[?&]width.*?(?=&|\?|$)//g; | |||||||||
| 240 | }# query params | ||||||||||
| 241 | 0 | ▶ | if ( exists $args{'height'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 242 | 0 | $_resource_path =~ s/\Q{height}\E/$args{'height'}/g; | |||||||||
| 243 | }else{ | ||||||||||
| 244 | 0 | $_resource_path =~ s/[?&]height.*?(?=&|\?|$)//g; | |||||||||
| 245 | }# query params | ||||||||||
| 246 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 247 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 248 | }else{ | ||||||||||
| 249 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 250 | } | ||||||||||
| 251 | |||||||||||
| 252 | |||||||||||
| 253 | 0 | my $_body_data; | |||||||||
| 254 | # form params | ||||||||||
| 255 | 0 | ▶ | if ( exists $args{'file'} ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 256 | |||||||||||
| 257 | 0 | $_body_data = read_file( $args{'file'} , binmode => ':raw' ); | |||||||||
| 258 | |||||||||||
| 259 | |||||||||||
| 260 | } | ||||||||||
| 261 | |||||||||||
| 262 | |||||||||||
| 263 | |||||||||||
| 264 | # authentication setting, if any | ||||||||||
| 265 | 0 | my $auth_settings = []; | |||||||||
| 266 | |||||||||||
| 267 | # make the API Call | ||||||||||
| 268 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 269 | $query_params, $form_params, | ||||||||||
| 270 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 271 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 272 | 0 | return; | |||||||||
| 273 | } | ||||||||||
| 274 | |||||||||||
| 275 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 276 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 277 | } | ||||||||||
| 278 | |||||||||||
| 279 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 280 | 0 | return $_response_object; | |||||||||
| 281 | |||||||||||
| 282 | } | ||||||||||
| 283 | # | ||||||||||
| 284 | # PostImageGif | ||||||||||
| 285 | # | ||||||||||
| 286 | # Update parameters of gif image. | ||||||||||
| 287 | # | ||||||||||
| 288 | # @param String $backgroundColorIndex Index of the background color. (optional) | ||||||||||
| 289 | # @param array $colorResolution Color resolution. (optional) | ||||||||||
| 290 | # @param array $hasTrailer Specifies if image has trailer. (optional) | ||||||||||
| 291 | # @param Integer $interlaced Specifies if image is interlaced. (optional) | ||||||||||
| 292 | # @param Boolean $isPaletteSorted Specifies if palette is sorted. (optional) | ||||||||||
| 293 | # @param String $pixelAspectRatio Pixel aspect ratio. (optional) | ||||||||||
| 294 | # @param Boolean $fromScratch 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. (optional) | ||||||||||
| 295 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 296 | # @param File $file (required) | ||||||||||
| 297 | # @return ResponseMessage | ||||||||||
| 298 | # | ||||||||||
| 299 | 0 | ▶ | sub PostImageGif { | ||||||||
|
Subroutine
PostImageGif: not called CC=14 SCAR=53.5
Pod
undocumented
| |||||||||||
| 300 | 0 | my ($self, %args) = @_; | |||||||||
| 301 | |||||||||||
| 302 | |||||||||||
| 303 | # verify the required parameter 'file' is set | ||||||||||
| 304 | 0 | ▶ | unless (exists $args{'file'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 305 | 0 | croak("Missing the required parameter 'file' when calling PostImageBmp"); | |||||||||
| 306 | } | ||||||||||
| 307 | |||||||||||
| 308 | |||||||||||
| 309 | # parse inputs | ||||||||||
| 310 | 0 | my $_resource_path = '/imaging/gif/?appSid={appSid}&backgroundColorIndex={backgroundColorIndex}&colorResolution={colorResolution}&hasTrailer={hasTrailer}&interlaced={interlaced}&isPaletteSorted={isPaletteSorted}&pixelAspectRatio={pixelAspectRatio}&fromScratch={fromScratch}&outPath={outPath}'; | |||||||||
| 311 | |||||||||||
| 312 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 313 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 314 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 315 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 316 | |||||||||||
| 317 | 0 | my $_method = 'POST'; | |||||||||
| 318 | 0 | my $query_params = {}; | |||||||||
| 319 | 0 | my $header_params = {}; | |||||||||
| 320 | 0 | my $form_params = {}; | |||||||||
| 321 | |||||||||||
| 322 | # 'Accept' and 'Content-Type' header | ||||||||||
| 323 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 324 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 325 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 326 | } | ||||||||||
| 327 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('multipart/form-data'); | |||||||||
| 328 | |||||||||||
| 329 | # query params | ||||||||||
| 330 | 0 | ▶ | if ( exists $args{'backgroundColorIndex'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 331 | 0 | $_resource_path =~ s/\Q{backgroundColorIndex}\E/$args{'backgroundColorIndex'}/g; | |||||||||
| 332 | }else{ | ||||||||||
| 333 | 0 | $_resource_path =~ s/[?&]backgroundColorIndex.*?(?=&|\?|$)//g; | |||||||||
| 334 | }# query params | ||||||||||
| 335 | 0 | ▶ | if ( exists $args{'colorResolution'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 336 | 0 | $_resource_path =~ s/\Q{colorResolution}\E/$args{'colorResolution'}/g; | |||||||||
| 337 | }else{ | ||||||||||
| 338 | 0 | $_resource_path =~ s/[?&]colorResolution.*?(?=&|\?|$)//g; | |||||||||
| 339 | }# query params | ||||||||||
| 340 | 0 | ▶ | if ( exists $args{'hasTrailer'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 341 | 0 | $_resource_path =~ s/\Q{hasTrailer}\E/$args{'hasTrailer'}/g; | |||||||||
| 342 | }else{ | ||||||||||
| 343 | 0 | $_resource_path =~ s/[?&]hasTrailer.*?(?=&|\?|$)//g; | |||||||||
| 344 | }# query params | ||||||||||
| 345 | 0 | ▶ | if ( exists $args{'interlaced'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 346 | 0 | $_resource_path =~ s/\Q{interlaced}\E/$args{'interlaced'}/g; | |||||||||
| 347 | }else{ | ||||||||||
| 348 | 0 | $_resource_path =~ s/[?&]interlaced.*?(?=&|\?|$)//g; | |||||||||
| 349 | }# query params | ||||||||||
| 350 | 0 | ▶ | if ( exists $args{'isPaletteSorted'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 351 | 0 | $_resource_path =~ s/\Q{isPaletteSorted}\E/$args{'isPaletteSorted'}/g; | |||||||||
| 352 | }else{ | ||||||||||
| 353 | 0 | $_resource_path =~ s/[?&]isPaletteSorted.*?(?=&|\?|$)//g; | |||||||||
| 354 | }# query params | ||||||||||
| 355 | 0 | ▶ | if ( exists $args{'pixelAspectRatio'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 356 | 0 | $_resource_path =~ s/\Q{pixelAspectRatio}\E/$args{'pixelAspectRatio'}/g; | |||||||||
| 357 | }else{ | ||||||||||
| 358 | 0 | $_resource_path =~ s/[?&]pixelAspectRatio.*?(?=&|\?|$)//g; | |||||||||
| 359 | }# query params | ||||||||||
| 360 | 0 | ▶ | if ( exists $args{'fromScratch'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 361 | 0 | $_resource_path =~ s/\Q{fromScratch}\E/$args{'fromScratch'}/g; | |||||||||
| 362 | }else{ | ||||||||||
| 363 | 0 | $_resource_path =~ s/[?&]fromScratch.*?(?=&|\?|$)//g; | |||||||||
| 364 | }# query params | ||||||||||
| 365 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 366 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 367 | }else{ | ||||||||||
| 368 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 369 | } | ||||||||||
| 370 | |||||||||||
| 371 | |||||||||||
| 372 | 0 | my $_body_data; | |||||||||
| 373 | # form params | ||||||||||
| 374 | 0 | ▶ | if ( exists $args{'file'} ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 375 | |||||||||||
| 376 | 0 | $_body_data = read_file( $args{'file'} , binmode => ':raw' ); | |||||||||
| 377 | |||||||||||
| 378 | |||||||||||
| 379 | } | ||||||||||
| 380 | |||||||||||
| 381 | |||||||||||
| 382 | |||||||||||
| 383 | # authentication setting, if any | ||||||||||
| 384 | 0 | my $auth_settings = []; | |||||||||
| 385 | |||||||||||
| 386 | # make the API Call | ||||||||||
| 387 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 388 | $query_params, $form_params, | ||||||||||
| 389 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 390 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 391 | 0 | return; | |||||||||
| 392 | } | ||||||||||
| 393 | |||||||||||
| 394 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 395 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 396 | } | ||||||||||
| 397 | |||||||||||
| 398 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 399 | 0 | return $_response_object; | |||||||||
| 400 | |||||||||||
| 401 | } | ||||||||||
| 402 | # | ||||||||||
| 403 | # PostImageJpg | ||||||||||
| 404 | # | ||||||||||
| 405 | # Update parameters of jpg image. | ||||||||||
| 406 | # | ||||||||||
| 407 | # @param String $quality Quality of image. From 0 to 100. Default is 75 (optional) | ||||||||||
| 408 | # @param String $compressionType Compression type. (optional) | ||||||||||
| 409 | # @param Boolean $fromScratch 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. (optional) | ||||||||||
| 410 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 411 | # @param File $file (required) | ||||||||||
| 412 | # @return ResponseMessage | ||||||||||
| 413 | # | ||||||||||
| 414 | 0 | ▶ | sub PostImageJpg { | ||||||||
|
Subroutine
PostImageJpg: not called CC=10 SCAR=47.0
Pod
undocumented
| |||||||||||
| 415 | 0 | my ($self, %args) = @_; | |||||||||
| 416 | |||||||||||
| 417 | |||||||||||
| 418 | # verify the required parameter 'file' is set | ||||||||||
| 419 | 0 | ▶ | unless (exists $args{'file'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 420 | 0 | croak("Missing the required parameter 'file' when calling PostImageJpg"); | |||||||||
| 421 | } | ||||||||||
| 422 | |||||||||||
| 423 | |||||||||||
| 424 | # parse inputs | ||||||||||
| 425 | 0 | my $_resource_path = '/imaging/jpg/?appSid={appSid}&quality={quality}&compressionType={compressionType}&fromScratch={fromScratch}&outPath={outPath}'; | |||||||||
| 426 | |||||||||||
| 427 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 428 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 429 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 430 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 431 | |||||||||||
| 432 | 0 | my $_method = 'POST'; | |||||||||
| 433 | 0 | my $query_params = {}; | |||||||||
| 434 | 0 | my $header_params = {}; | |||||||||
| 435 | 0 | my $form_params = {}; | |||||||||
| 436 | |||||||||||
| 437 | # 'Accept' and 'Content-Type' header | ||||||||||
| 438 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 439 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 440 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 441 | } | ||||||||||
| 442 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('multipart/form-data'); | |||||||||
| 443 | |||||||||||
| 444 | # query params | ||||||||||
| 445 | 0 | ▶ | if ( exists $args{'quality'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 446 | 0 | $_resource_path =~ s/\Q{quality}\E/$args{'quality'}/g; | |||||||||
| 447 | }else{ | ||||||||||
| 448 | 0 | $_resource_path =~ s/[?&]quality.*?(?=&|\?|$)//g; | |||||||||
| 449 | }# query params | ||||||||||
| 450 | 0 | ▶ | if ( exists $args{'compressionType'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 451 | 0 | $_resource_path =~ s/\Q{compressionType}\E/$args{'compressionType'}/g; | |||||||||
| 452 | }else{ | ||||||||||
| 453 | 0 | $_resource_path =~ s/[?&]compressionType.*?(?=&|\?|$)//g; | |||||||||
| 454 | }# query params | ||||||||||
| 455 | 0 | ▶ | if ( exists $args{'fromScratch'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 456 | 0 | $_resource_path =~ s/\Q{fromScratch}\E/$args{'fromScratch'}/g; | |||||||||
| 457 | }else{ | ||||||||||
| 458 | 0 | $_resource_path =~ s/[?&]fromScratch.*?(?=&|\?|$)//g; | |||||||||
| 459 | }# query params | ||||||||||
| 460 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 461 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 462 | }else{ | ||||||||||
| 463 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 464 | } | ||||||||||
| 465 | |||||||||||
| 466 | |||||||||||
| 467 | 0 | my $_body_data; | |||||||||
| 468 | # form params | ||||||||||
| 469 | 0 | ▶ | if ( exists $args{'file'} ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 470 | |||||||||||
| 471 | 0 | $_body_data = read_file( $args{'file'} , binmode => ':raw' ); | |||||||||
| 472 | |||||||||||
| 473 | |||||||||||
| 474 | } | ||||||||||
| 475 | |||||||||||
| 476 | |||||||||||
| 477 | |||||||||||
| 478 | # authentication setting, if any | ||||||||||
| 479 | 0 | my $auth_settings = []; | |||||||||
| 480 | |||||||||||
| 481 | # make the API Call | ||||||||||
| 482 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 483 | $query_params, $form_params, | ||||||||||
| 484 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 485 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 486 | 0 | return; | |||||||||
| 487 | } | ||||||||||
| 488 | |||||||||||
| 489 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 490 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 491 | } | ||||||||||
| 492 | |||||||||||
| 493 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 494 | 0 | return $_response_object; | |||||||||
| 495 | |||||||||||
| 496 | } | ||||||||||
| 497 | # | ||||||||||
| 498 | # PostImagePng | ||||||||||
| 499 | # | ||||||||||
| 500 | # Update parameters of png image. | ||||||||||
| 501 | # | ||||||||||
| 502 | # @param Boolean $fromScratch 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. (optional) | ||||||||||
| 503 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 504 | # @param File $file (required) | ||||||||||
| 505 | # @return ResponseMessage | ||||||||||
| 506 | # | ||||||||||
| 507 | 0 | ▶ | sub PostImagePng { | ||||||||
|
Subroutine
PostImagePng: not called CC=8 SCAR=42.8
Pod
undocumented
| |||||||||||
| 508 | 0 | my ($self, %args) = @_; | |||||||||
| 509 | |||||||||||
| 510 | |||||||||||
| 511 | # verify the required parameter 'file' is set | ||||||||||
| 512 | 0 | ▶ | unless (exists $args{'file'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 513 | 0 | croak("Missing the required parameter 'file' when calling PostImagePng"); | |||||||||
| 514 | } | ||||||||||
| 515 | |||||||||||
| 516 | |||||||||||
| 517 | # parse inputs | ||||||||||
| 518 | 0 | my $_resource_path = '/imaging/png/?appSid={appSid}&fromScratch={fromScratch}&outPath={outPath}'; | |||||||||
| 519 | |||||||||||
| 520 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 521 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 522 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 523 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 524 | |||||||||||
| 525 | 0 | my $_method = 'POST'; | |||||||||
| 526 | 0 | my $query_params = {}; | |||||||||
| 527 | 0 | my $header_params = {}; | |||||||||
| 528 | 0 | my $form_params = {}; | |||||||||
| 529 | |||||||||||
| 530 | # 'Accept' and 'Content-Type' header | ||||||||||
| 531 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 532 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 533 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 534 | } | ||||||||||
| 535 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('multipart/form-data'); | |||||||||
| 536 | |||||||||||
| 537 | # query params | ||||||||||
| 538 | 0 | ▶ | if ( exists $args{'fromScratch'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 539 | 0 | $_resource_path =~ s/\Q{fromScratch}\E/$args{'fromScratch'}/g; | |||||||||
| 540 | }else{ | ||||||||||
| 541 | 0 | $_resource_path =~ s/[?&]fromScratch.*?(?=&|\?|$)//g; | |||||||||
| 542 | }# query params | ||||||||||
| 543 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 544 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 545 | }else{ | ||||||||||
| 546 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 547 | } | ||||||||||
| 548 | |||||||||||
| 549 | |||||||||||
| 550 | 0 | my $_body_data; | |||||||||
| 551 | # form params | ||||||||||
| 552 | 0 | ▶ | if ( exists $args{'file'} ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 553 | |||||||||||
| 554 | 0 | $_body_data = read_file( $args{'file'} , binmode => ':raw' ); | |||||||||
| 555 | |||||||||||
| 556 | |||||||||||
| 557 | } | ||||||||||
| 558 | |||||||||||
| 559 | |||||||||||
| 560 | |||||||||||
| 561 | # authentication setting, if any | ||||||||||
| 562 | 0 | my $auth_settings = []; | |||||||||
| 563 | |||||||||||
| 564 | # make the API Call | ||||||||||
| 565 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 566 | $query_params, $form_params, | ||||||||||
| 567 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 568 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 569 | 0 | return; | |||||||||
| 570 | } | ||||||||||
| 571 | |||||||||||
| 572 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 573 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 574 | } | ||||||||||
| 575 | |||||||||||
| 576 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 577 | 0 | return $_response_object; | |||||||||
| 578 | |||||||||||
| 579 | } | ||||||||||
| 580 | # | ||||||||||
| 581 | # PostImagePsd | ||||||||||
| 582 | # | ||||||||||
| 583 | # Update parameters of psd image. | ||||||||||
| 584 | # | ||||||||||
| 585 | # @param Integer $channelsCount Count of channels. (optional) | ||||||||||
| 586 | # @param String $compressionMethod Compression method. (optional) | ||||||||||
| 587 | # @param Boolean $fromScratch 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. (optional) | ||||||||||
| 588 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 589 | # @param File $file (required) | ||||||||||
| 590 | # @return ResponseMessage | ||||||||||
| 591 | # | ||||||||||
| 592 | 0 | ▶ | sub PostImagePsd { | ||||||||
|
Subroutine
PostImagePsd: not called CC=10 SCAR=47.0
Pod
undocumented
| |||||||||||
| 593 | 0 | my ($self, %args) = @_; | |||||||||
| 594 | |||||||||||
| 595 | |||||||||||
| 596 | # verify the required parameter 'file' is set | ||||||||||
| 597 | 0 | ▶ | unless (exists $args{'file'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 598 | 0 | croak("Missing the required parameter 'file' when calling PostImagePsd"); | |||||||||
| 599 | } | ||||||||||
| 600 | |||||||||||
| 601 | |||||||||||
| 602 | # parse inputs | ||||||||||
| 603 | 0 | my $_resource_path = '/imaging/psd/?appSid={appSid}&channelsCount={channelsCount}&compressionMethod={compressionMethod}&fromScratch={fromScratch}&outPath={outPath}'; | |||||||||
| 604 | |||||||||||
| 605 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 606 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 607 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 608 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 609 | |||||||||||
| 610 | 0 | my $_method = 'POST'; | |||||||||
| 611 | 0 | my $query_params = {}; | |||||||||
| 612 | 0 | my $header_params = {}; | |||||||||
| 613 | 0 | my $form_params = {}; | |||||||||
| 614 | |||||||||||
| 615 | # 'Accept' and 'Content-Type' header | ||||||||||
| 616 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 617 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 618 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 619 | } | ||||||||||
| 620 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('multipart/form-data'); | |||||||||
| 621 | |||||||||||
| 622 | # query params | ||||||||||
| 623 | 0 | ▶ | if ( exists $args{'channelsCount'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 624 | 0 | $_resource_path =~ s/\Q{channelsCount}\E/$args{'channelsCount'}/g; | |||||||||
| 625 | }else{ | ||||||||||
| 626 | 0 | $_resource_path =~ s/[?&]channelsCount.*?(?=&|\?|$)//g; | |||||||||
| 627 | }# query params | ||||||||||
| 628 | 0 | ▶ | if ( exists $args{'compressionMethod'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 629 | 0 | $_resource_path =~ s/\Q{compressionMethod}\E/$args{'compressionMethod'}/g; | |||||||||
| 630 | }else{ | ||||||||||
| 631 | 0 | $_resource_path =~ s/[?&]compressionMethod.*?(?=&|\?|$)//g; | |||||||||
| 632 | }# query params | ||||||||||
| 633 | 0 | ▶ | if ( exists $args{'fromScratch'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 634 | 0 | $_resource_path =~ s/\Q{fromScratch}\E/$args{'fromScratch'}/g; | |||||||||
| 635 | }else{ | ||||||||||
| 636 | 0 | $_resource_path =~ s/[?&]fromScratch.*?(?=&|\?|$)//g; | |||||||||
| 637 | }# query params | ||||||||||
| 638 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 639 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 640 | }else{ | ||||||||||
| 641 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 642 | } | ||||||||||
| 643 | |||||||||||
| 644 | |||||||||||
| 645 | 0 | my $_body_data; | |||||||||
| 646 | # form params | ||||||||||
| 647 | 0 | ▶ | if ( exists $args{'file'} ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 648 | |||||||||||
| 649 | 0 | $_body_data = read_file( $args{'file'} , binmode => ':raw' ); | |||||||||
| 650 | |||||||||||
| 651 | |||||||||||
| 652 | } | ||||||||||
| 653 | |||||||||||
| 654 | |||||||||||
| 655 | |||||||||||
| 656 | # authentication setting, if any | ||||||||||
| 657 | 0 | my $auth_settings = []; | |||||||||
| 658 | |||||||||||
| 659 | # make the API Call | ||||||||||
| 660 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 661 | $query_params, $form_params, | ||||||||||
| 662 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 663 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 664 | 0 | return; | |||||||||
| 665 | } | ||||||||||
| 666 | |||||||||||
| 667 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 668 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 669 | } | ||||||||||
| 670 | |||||||||||
| 671 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 672 | 0 | return $_response_object; | |||||||||
| 673 | |||||||||||
| 674 | } | ||||||||||
| 675 | # | ||||||||||
| 676 | # PostChangeImageScale | ||||||||||
| 677 | # | ||||||||||
| 678 | # Change scale of an image from body | ||||||||||
| 679 | # | ||||||||||
| 680 | # @param String $format Output file format. Valid Formats: Bmp, png, jpg, tiff, psd, gif. (required) | ||||||||||
| 681 | # @param String $newWidth New width of the scaled image. (required) | ||||||||||
| 682 | # @param String $newHeight New height of the scaled image. (required) | ||||||||||
| 683 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 684 | # @param File $file (required) | ||||||||||
| 685 | # @return ResponseMessage | ||||||||||
| 686 | # | ||||||||||
| 687 | 0 | ▶ | sub PostChangeImageScale { | ||||||||
|
Subroutine
PostChangeImageScale: not called CC=13 SCAR=52.0
Pod
undocumented
| |||||||||||
| 688 | 0 | my ($self, %args) = @_; | |||||||||
| 689 | |||||||||||
| 690 | |||||||||||
| 691 | # verify the required parameter 'format' is set | ||||||||||
| 692 | 0 | ▶ | unless (exists $args{'format'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 693 | 0 | croak("Missing the required parameter 'format' when calling PostChangeImageScale"); | |||||||||
| 694 | } | ||||||||||
| 695 | |||||||||||
| 696 | # verify the required parameter 'newWidth' is set | ||||||||||
| 697 | 0 | ▶ | unless (exists $args{'newWidth'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 698 | 0 | croak("Missing the required parameter 'newWidth' when calling PostChangeImageScale"); | |||||||||
| 699 | } | ||||||||||
| 700 | |||||||||||
| 701 | # verify the required parameter 'newHeight' is set | ||||||||||
| 702 | 0 | ▶ | unless (exists $args{'newHeight'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 703 | 0 | croak("Missing the required parameter 'newHeight' when calling PostChangeImageScale"); | |||||||||
| 704 | } | ||||||||||
| 705 | |||||||||||
| 706 | # verify the required parameter 'file' is set | ||||||||||
| 707 | 0 | ▶ | unless (exists $args{'file'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 708 | 0 | croak("Missing the required parameter 'file' when calling PostChangeImageScale"); | |||||||||
| 709 | } | ||||||||||
| 710 | |||||||||||
| 711 | |||||||||||
| 712 | # parse inputs | ||||||||||
| 713 | 0 | my $_resource_path = '/imaging/resize/?appSid={appSid}&toFormat={toFormat}&newWidth={newWidth}&newHeight={newHeight}&outPath={outPath}'; | |||||||||
| 714 | |||||||||||
| 715 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 716 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 717 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 718 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 719 | |||||||||||
| 720 | 0 | my $_method = 'POST'; | |||||||||
| 721 | 0 | my $query_params = {}; | |||||||||
| 722 | 0 | my $header_params = {}; | |||||||||
| 723 | 0 | my $form_params = {}; | |||||||||
| 724 | |||||||||||
| 725 | # 'Accept' and 'Content-Type' header | ||||||||||
| 726 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 727 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 728 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 729 | } | ||||||||||
| 730 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('multipart/form-data'); | |||||||||
| 731 | |||||||||||
| 732 | # query params | ||||||||||
| 733 | 0 | ▶ | if ( exists $args{'format'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 734 | 0 | $_resource_path =~ s/\Q{format}\E/$args{'format'}/g; | |||||||||
| 735 | }else{ | ||||||||||
| 736 | 0 | $_resource_path =~ s/[?&]format.*?(?=&|\?|$)//g; | |||||||||
| 737 | }# query params | ||||||||||
| 738 | 0 | ▶ | if ( exists $args{'newWidth'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 739 | 0 | $_resource_path =~ s/\Q{newWidth}\E/$args{'newWidth'}/g; | |||||||||
| 740 | }else{ | ||||||||||
| 741 | 0 | $_resource_path =~ s/[?&]newWidth.*?(?=&|\?|$)//g; | |||||||||
| 742 | }# query params | ||||||||||
| 743 | 0 | ▶ | if ( exists $args{'newHeight'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 744 | 0 | $_resource_path =~ s/\Q{newHeight}\E/$args{'newHeight'}/g; | |||||||||
| 745 | }else{ | ||||||||||
| 746 | 0 | $_resource_path =~ s/[?&]newHeight.*?(?=&|\?|$)//g; | |||||||||
| 747 | }# query params | ||||||||||
| 748 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 749 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 750 | }else{ | ||||||||||
| 751 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 752 | } | ||||||||||
| 753 | |||||||||||
| 754 | |||||||||||
| 755 | 0 | my $_body_data; | |||||||||
| 756 | # form params | ||||||||||
| 757 | 0 | ▶ | if ( exists $args{'file'} ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 758 | |||||||||||
| 759 | 0 | $_body_data = read_file( $args{'file'} , binmode => ':raw' ); | |||||||||
| 760 | |||||||||||
| 761 | |||||||||||
| 762 | } | ||||||||||
| 763 | |||||||||||
| 764 | |||||||||||
| 765 | |||||||||||
| 766 | # authentication setting, if any | ||||||||||
| 767 | 0 | my $auth_settings = []; | |||||||||
| 768 | |||||||||||
| 769 | # make the API Call | ||||||||||
| 770 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 771 | $query_params, $form_params, | ||||||||||
| 772 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 773 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 774 | 0 | return; | |||||||||
| 775 | } | ||||||||||
| 776 | |||||||||||
| 777 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 778 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 779 | } | ||||||||||
| 780 | |||||||||||
| 781 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 782 | 0 | return $_response_object; | |||||||||
| 783 | |||||||||||
| 784 | } | ||||||||||
| 785 | # | ||||||||||
| 786 | # PostImageRotateFlip | ||||||||||
| 787 | # | ||||||||||
| 788 | # Rotate and flip existing image and get it from response. | ||||||||||
| 789 | # | ||||||||||
| 790 | # @param String $format Number of frame. (Bmp, png, jpg, tiff, psd, gif.) (required) | ||||||||||
| 791 | # @param String $method New width of the scaled image. (Rotate180FlipNone, Rotate180FlipX, Rotate180FlipXY, Rotate180FlipY, Rotate270FlipNone, Rotate270FlipX, Rotate270FlipXY, Rotate270FlipY, Rotate90FlipNone, Rotate90FlipX, Rotate90FlipXY, Rotate90FlipY, RotateNoneFlipNone, RotateNoneFlipX, RotateNoneFlipXY, RotateNoneFlipY) (required) | ||||||||||
| 792 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 793 | # @param File $file (required) | ||||||||||
| 794 | # @return ResponseMessage | ||||||||||
| 795 | # | ||||||||||
| 796 | 0 | ▶ | sub PostImageRotateFlip { | ||||||||
|
Subroutine
PostImageRotateFlip: not called CC=11 SCAR=48.8
Pod
undocumented
| |||||||||||
| 797 | 0 | my ($self, %args) = @_; | |||||||||
| 798 | |||||||||||
| 799 | |||||||||||
| 800 | # verify the required parameter 'format' is set | ||||||||||
| 801 | 0 | ▶ | unless (exists $args{'format'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 802 | 0 | croak("Missing the required parameter 'format' when calling PostImageRotateFlip"); | |||||||||
| 803 | } | ||||||||||
| 804 | |||||||||||
| 805 | # verify the required parameter 'method' is set | ||||||||||
| 806 | 0 | ▶ | unless (exists $args{'method'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 807 | 0 | croak("Missing the required parameter 'method' when calling PostImageRotateFlip"); | |||||||||
| 808 | } | ||||||||||
| 809 | |||||||||||
| 810 | # verify the required parameter 'file' is set | ||||||||||
| 811 | 0 | ▶ | unless (exists $args{'file'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 812 | 0 | croak("Missing the required parameter 'file' when calling PostImageRotateFlip"); | |||||||||
| 813 | } | ||||||||||
| 814 | |||||||||||
| 815 | |||||||||||
| 816 | # parse inputs | ||||||||||
| 817 | 0 | my $_resource_path = '/imaging/rotateflip/?toFormat={toFormat}&appSid={appSid}&method={method}&outPath={outPath}'; | |||||||||
| 818 | |||||||||||
| 819 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 820 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 821 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 822 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 823 | |||||||||||
| 824 | 0 | my $_method = 'POST'; | |||||||||
| 825 | 0 | my $query_params = {}; | |||||||||
| 826 | 0 | my $header_params = {}; | |||||||||
| 827 | 0 | my $form_params = {}; | |||||||||
| 828 | |||||||||||
| 829 | # 'Accept' and 'Content-Type' header | ||||||||||
| 830 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 831 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 832 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 833 | } | ||||||||||
| 834 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('multipart/form-data'); | |||||||||
| 835 | |||||||||||
| 836 | # query params | ||||||||||
| 837 | 0 | ▶ | if ( exists $args{'format'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 838 | 0 | $_resource_path =~ s/\Q{format}\E/$args{'format'}/g; | |||||||||
| 839 | }else{ | ||||||||||
| 840 | 0 | $_resource_path =~ s/[?&]format.*?(?=&|\?|$)//g; | |||||||||
| 841 | }# query params | ||||||||||
| 842 | 0 | ▶ | if ( exists $args{'method'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 843 | 0 | $_resource_path =~ s/\Q{method}\E/$args{'method'}/g; | |||||||||
| 844 | }else{ | ||||||||||
| 845 | 0 | $_resource_path =~ s/[?&]method.*?(?=&|\?|$)//g; | |||||||||
| 846 | }# query params | ||||||||||
| 847 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 848 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 849 | }else{ | ||||||||||
| 850 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 851 | } | ||||||||||
| 852 | |||||||||||
| 853 | |||||||||||
| 854 | 0 | my $_body_data; | |||||||||
| 855 | # form params | ||||||||||
| 856 | 0 | ▶ | if ( exists $args{'file'} ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 857 | |||||||||||
| 858 | 0 | $_body_data = read_file( $args{'file'} , binmode => ':raw' ); | |||||||||
| 859 | |||||||||||
| 860 | |||||||||||
| 861 | } | ||||||||||
| 862 | |||||||||||
| 863 | |||||||||||
| 864 | |||||||||||
| 865 | # authentication setting, if any | ||||||||||
| 866 | 0 | my $auth_settings = []; | |||||||||
| 867 | |||||||||||
| 868 | # make the API Call | ||||||||||
| 869 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 870 | $query_params, $form_params, | ||||||||||
| 871 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 872 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 873 | 0 | return; | |||||||||
| 874 | } | ||||||||||
| 875 | |||||||||||
| 876 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 877 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 878 | } | ||||||||||
| 879 | |||||||||||
| 880 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 881 | 0 | return $_response_object; | |||||||||
| 882 | |||||||||||
| 883 | } | ||||||||||
| 884 | # | ||||||||||
| 885 | # PostImageSaveAs | ||||||||||
| 886 | # | ||||||||||
| 887 | # Export existing image to another format. Image is passed as request body. | ||||||||||
| 888 | # | ||||||||||
| 889 | # @param String $format Output file format. (Bmp, png, jpg, tiff, psd, gif.) (required) | ||||||||||
| 890 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 891 | # @param File $file (required) | ||||||||||
| 892 | # @return ResponseMessage | ||||||||||
| 893 | # | ||||||||||
| 894 | 0 | ▶ | sub PostImageSaveAs { | ||||||||
|
Subroutine
PostImageSaveAs: not called CC=9 SCAR=45.0
Pod
undocumented
| |||||||||||
| 895 | 0 | my ($self, %args) = @_; | |||||||||
| 896 | |||||||||||
| 897 | |||||||||||
| 898 | # verify the required parameter 'format' is set | ||||||||||
| 899 | 0 | ▶ | unless (exists $args{'format'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 900 | 0 | croak("Missing the required parameter 'format' when calling PostImageSaveAs"); | |||||||||
| 901 | } | ||||||||||
| 902 | |||||||||||
| 903 | # verify the required parameter 'file' is set | ||||||||||
| 904 | 0 | ▶ | unless (exists $args{'file'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 905 | 0 | croak("Missing the required parameter 'file' when calling PostImageSaveAs"); | |||||||||
| 906 | } | ||||||||||
| 907 | |||||||||||
| 908 | |||||||||||
| 909 | # parse inputs | ||||||||||
| 910 | 0 | my $_resource_path = '/imaging/saveAs/?appSid={appSid}&toFormat={toFormat}&outPath={outPath}'; | |||||||||
| 911 | |||||||||||
| 912 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 913 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 914 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 915 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 916 | |||||||||||
| 917 | 0 | my $_method = 'POST'; | |||||||||
| 918 | 0 | my $query_params = {}; | |||||||||
| 919 | 0 | my $header_params = {}; | |||||||||
| 920 | 0 | my $form_params = {}; | |||||||||
| 921 | |||||||||||
| 922 | # 'Accept' and 'Content-Type' header | ||||||||||
| 923 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 924 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 925 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 926 | } | ||||||||||
| 927 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('multipart/form-data'); | |||||||||
| 928 | |||||||||||
| 929 | # query params | ||||||||||
| 930 | 0 | ▶ | if ( exists $args{'format'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 931 | 0 | $_resource_path =~ s/\Q{format}\E/$args{'format'}/g; | |||||||||
| 932 | }else{ | ||||||||||
| 933 | 0 | $_resource_path =~ s/[?&]format.*?(?=&|\?|$)//g; | |||||||||
| 934 | }# query params | ||||||||||
| 935 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 936 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 937 | }else{ | ||||||||||
| 938 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 939 | } | ||||||||||
| 940 | |||||||||||
| 941 | |||||||||||
| 942 | 0 | my $_body_data; | |||||||||
| 943 | # form params | ||||||||||
| 944 | 0 | ▶ | if ( exists $args{'file'} ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 945 | |||||||||||
| 946 | 0 | $_body_data = read_file( $args{'file'} , binmode => ':raw' ); | |||||||||
| 947 | |||||||||||
| 948 | |||||||||||
| 949 | } | ||||||||||
| 950 | |||||||||||
| 951 | |||||||||||
| 952 | |||||||||||
| 953 | # authentication setting, if any | ||||||||||
| 954 | 0 | my $auth_settings = []; | |||||||||
| 955 | |||||||||||
| 956 | # make the API Call | ||||||||||
| 957 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 958 | $query_params, $form_params, | ||||||||||
| 959 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 960 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 961 | 0 | return; | |||||||||
| 962 | } | ||||||||||
| 963 | |||||||||||
| 964 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 965 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 966 | } | ||||||||||
| 967 | |||||||||||
| 968 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 969 | 0 | return $_response_object; | |||||||||
| 970 | |||||||||||
| 971 | } | ||||||||||
| 972 | # | ||||||||||
| 973 | # PostProcessTiff | ||||||||||
| 974 | # | ||||||||||
| 975 | # Update tiff image. | ||||||||||
| 976 | # | ||||||||||
| 977 | # @param String $compression New compression. (optional) | ||||||||||
| 978 | # @param String $resolutionUnit New resolution unit. (optional) | ||||||||||
| 979 | # @param String $bitDepth New bit depth. (optional) | ||||||||||
| 980 | # @param Boolean $fromScratch (optional) | ||||||||||
| 981 | # @param String $horizontalResolution New horizontal resolution. (optional) | ||||||||||
| 982 | # @param String $verticalResolution New verstical resolution. (optional) | ||||||||||
| 983 | # @param String $outPath Path to save result (optional) | ||||||||||
| 984 | # @param File $file (required) | ||||||||||
| 985 | # @return ResponseMessage | ||||||||||
| 986 | # | ||||||||||
| 987 | 0 | ▶ | sub PostProcessTiff { | ||||||||
|
Subroutine
PostProcessTiff: not called CC=13 SCAR=52.0
Pod
undocumented
| |||||||||||
| 988 | 0 | my ($self, %args) = @_; | |||||||||
| 989 | |||||||||||
| 990 | |||||||||||
| 991 | # verify the required parameter 'file' is set | ||||||||||
| 992 | 0 | ▶ | unless (exists $args{'file'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 993 | 0 | croak("Missing the required parameter 'file' when calling PostProcessTiff"); | |||||||||
| 994 | } | ||||||||||
| 995 | |||||||||||
| 996 | |||||||||||
| 997 | # parse inputs | ||||||||||
| 998 | 0 | my $_resource_path = '/imaging/tiff/?appSid={appSid}&compression={compression}&resolutionUnit={resolutionUnit}&bitDepth={bitDepth}&fromScratch={fromScratch}&horizontalResolution={horizontalResolution}&verticalResolution={verticalResolution}&outPath={outPath}'; | |||||||||
| 999 | |||||||||||
| 1000 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 1001 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 1002 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 1003 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 1004 | |||||||||||
| 1005 | 0 | my $_method = 'POST'; | |||||||||
| 1006 | 0 | my $query_params = {}; | |||||||||
| 1007 | 0 | my $header_params = {}; | |||||||||
| 1008 | 0 | my $form_params = {}; | |||||||||
| 1009 | |||||||||||
| 1010 | # 'Accept' and 'Content-Type' header | ||||||||||
| 1011 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 1012 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1013 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 1014 | } | ||||||||||
| 1015 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('multipart/form-data'); | |||||||||
| 1016 | |||||||||||
| 1017 | # query params | ||||||||||
| 1018 | 0 | ▶ | if ( exists $args{'compression'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1019 | 0 | $_resource_path =~ s/\Q{compression}\E/$args{'compression'}/g; | |||||||||
| 1020 | }else{ | ||||||||||
| 1021 | 0 | $_resource_path =~ s/[?&]compression.*?(?=&|\?|$)//g; | |||||||||
| 1022 | }# query params | ||||||||||
| 1023 | 0 | ▶ | if ( exists $args{'resolutionUnit'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1024 | 0 | $_resource_path =~ s/\Q{resolutionUnit}\E/$args{'resolutionUnit'}/g; | |||||||||
| 1025 | }else{ | ||||||||||
| 1026 | 0 | $_resource_path =~ s/[?&]resolutionUnit.*?(?=&|\?|$)//g; | |||||||||
| 1027 | }# query params | ||||||||||
| 1028 | 0 | ▶ | if ( exists $args{'bitDepth'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1029 | 0 | $_resource_path =~ s/\Q{bitDepth}\E/$args{'bitDepth'}/g; | |||||||||
| 1030 | }else{ | ||||||||||
| 1031 | 0 | $_resource_path =~ s/[?&]bitDepth.*?(?=&|\?|$)//g; | |||||||||
| 1032 | }# query params | ||||||||||
| 1033 | 0 | ▶ | if ( exists $args{'fromScratch'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1034 | 0 | $_resource_path =~ s/\Q{fromScratch}\E/$args{'fromScratch'}/g; | |||||||||
| 1035 | }else{ | ||||||||||
| 1036 | 0 | $_resource_path =~ s/[?&]fromScratch.*?(?=&|\?|$)//g; | |||||||||
| 1037 | }# query params | ||||||||||
| 1038 | 0 | ▶ | if ( exists $args{'horizontalResolution'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1039 | 0 | $_resource_path =~ s/\Q{horizontalResolution}\E/$args{'horizontalResolution'}/g; | |||||||||
| 1040 | }else{ | ||||||||||
| 1041 | 0 | $_resource_path =~ s/[?&]horizontalResolution.*?(?=&|\?|$)//g; | |||||||||
| 1042 | }# query params | ||||||||||
| 1043 | 0 | ▶ | if ( exists $args{'verticalResolution'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1044 | 0 | $_resource_path =~ s/\Q{verticalResolution}\E/$args{'verticalResolution'}/g; | |||||||||
| 1045 | }else{ | ||||||||||
| 1046 | 0 | $_resource_path =~ s/[?&]verticalResolution.*?(?=&|\?|$)//g; | |||||||||
| 1047 | }# query params | ||||||||||
| 1048 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1049 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 1050 | }else{ | ||||||||||
| 1051 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 1052 | } | ||||||||||
| 1053 | |||||||||||
| 1054 | |||||||||||
| 1055 | 0 | my $_body_data; | |||||||||
| 1056 | # form params | ||||||||||
| 1057 | 0 | ▶ | if ( exists $args{'file'} ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1058 | |||||||||||
| 1059 | 0 | $_body_data = read_file( $args{'file'} , binmode => ':raw' ); | |||||||||
| 1060 | |||||||||||
| 1061 | |||||||||||
| 1062 | } | ||||||||||
| 1063 | |||||||||||
| 1064 | |||||||||||
| 1065 | |||||||||||
| 1066 | # authentication setting, if any | ||||||||||
| 1067 | 0 | my $auth_settings = []; | |||||||||
| 1068 | |||||||||||
| 1069 | # make the API Call | ||||||||||
| 1070 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 1071 | $query_params, $form_params, | ||||||||||
| 1072 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 1073 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1074 | 0 | return; | |||||||||
| 1075 | } | ||||||||||
| 1076 | |||||||||||
| 1077 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1078 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 1079 | } | ||||||||||
| 1080 | |||||||||||
| 1081 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 1082 | 0 | return $_response_object; | |||||||||
| 1083 | |||||||||||
| 1084 | } | ||||||||||
| 1085 | # | ||||||||||
| 1086 | # PostTiffAppend | ||||||||||
| 1087 | # | ||||||||||
| 1088 | # Append tiff image. | ||||||||||
| 1089 | # | ||||||||||
| 1090 | # @param String $name Original image name. (required) | ||||||||||
| 1091 | # @param String $appendFile Second image file name. (optional) | ||||||||||
| 1092 | # @param String $storage The images storage. (optional) | ||||||||||
| 1093 | # @param String $folder The images folder. (optional) | ||||||||||
| 1094 | # @return SaaSposeResponse | ||||||||||
| 1095 | # | ||||||||||
| 1096 | 0 | ▶ | sub PostTiffAppend { | ||||||||
|
Subroutine
PostTiffAppend: not called CC=9 SCAR=45.0
Pod
undocumented
| |||||||||||
| 1097 | 0 | my ($self, %args) = @_; | |||||||||
| 1098 | |||||||||||
| 1099 | |||||||||||
| 1100 | # verify the required parameter 'name' is set | ||||||||||
| 1101 | 0 | ▶ | unless (exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1102 | 0 | croak("Missing the required parameter 'name' when calling PostTiffAppend"); | |||||||||
| 1103 | } | ||||||||||
| 1104 | |||||||||||
| 1105 | |||||||||||
| 1106 | # parse inputs | ||||||||||
| 1107 | 0 | my $_resource_path = '/imaging/tiff/{name}/appendTiff/?appSid={appSid}&appendFile={appendFile}&storage={storage}&folder={folder}'; | |||||||||
| 1108 | |||||||||||
| 1109 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 1110 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 1111 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 1112 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 1113 | |||||||||||
| 1114 | 0 | my $_method = 'POST'; | |||||||||
| 1115 | 0 | my $query_params = {}; | |||||||||
| 1116 | 0 | my $header_params = {}; | |||||||||
| 1117 | 0 | my $form_params = {}; | |||||||||
| 1118 | |||||||||||
| 1119 | # 'Accept' and 'Content-Type' header | ||||||||||
| 1120 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json'); | |||||||||
| 1121 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1122 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 1123 | } | ||||||||||
| 1124 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | |||||||||
| 1125 | |||||||||||
| 1126 | # query params | ||||||||||
| 1127 | 0 | ▶ | if ( exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1128 | 0 | $_resource_path =~ s/\Q{name}\E/$args{'name'}/g; | |||||||||
| 1129 | }else{ | ||||||||||
| 1130 | 0 | $_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g; | |||||||||
| 1131 | }# query params | ||||||||||
| 1132 | 0 | ▶ | if ( exists $args{'appendFile'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1133 | 0 | $_resource_path =~ s/\Q{appendFile}\E/$args{'appendFile'}/g; | |||||||||
| 1134 | }else{ | ||||||||||
| 1135 | 0 | $_resource_path =~ s/[?&]appendFile.*?(?=&|\?|$)//g; | |||||||||
| 1136 | }# query params | ||||||||||
| 1137 | 0 | ▶ | if ( exists $args{'storage'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1138 | 0 | $_resource_path =~ s/\Q{storage}\E/$args{'storage'}/g; | |||||||||
| 1139 | }else{ | ||||||||||
| 1140 | 0 | $_resource_path =~ s/[?&]storage.*?(?=&|\?|$)//g; | |||||||||
| 1141 | }# query params | ||||||||||
| 1142 | 0 | ▶ | if ( exists $args{'folder'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1143 | 0 | $_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g; | |||||||||
| 1144 | }else{ | ||||||||||
| 1145 | 0 | $_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g; | |||||||||
| 1146 | } | ||||||||||
| 1147 | |||||||||||
| 1148 | |||||||||||
| 1149 | 0 | my $_body_data; | |||||||||
| 1150 | |||||||||||
| 1151 | |||||||||||
| 1152 | |||||||||||
| 1153 | |||||||||||
| 1154 | # authentication setting, if any | ||||||||||
| 1155 | 0 | my $auth_settings = []; | |||||||||
| 1156 | |||||||||||
| 1157 | # make the API Call | ||||||||||
| 1158 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 1159 | $query_params, $form_params, | ||||||||||
| 1160 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 1161 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1162 | 0 | return; | |||||||||
| 1163 | } | ||||||||||
| 1164 | |||||||||||
| 1165 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1166 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 1167 | } | ||||||||||
| 1168 | |||||||||||
| 1169 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'SaaSposeResponse', $response->header('content-type')); | |||||||||
| 1170 | 0 | return $_response_object; | |||||||||
| 1171 | |||||||||||
| 1172 | } | ||||||||||
| 1173 | # | ||||||||||
| 1174 | # GetTiffToFax | ||||||||||
| 1175 | # | ||||||||||
| 1176 | # Get tiff image for fax. | ||||||||||
| 1177 | # | ||||||||||
| 1178 | # @param String $name The image file name. (required) | ||||||||||
| 1179 | # @param String $storage The image file storage. (optional) | ||||||||||
| 1180 | # @param String $folder The image file folder. (optional) | ||||||||||
| 1181 | # @param String $outPath Path to save result (optional) | ||||||||||
| 1182 | # @return ResponseMessage | ||||||||||
| 1183 | # | ||||||||||
| 1184 | 0 | ▶ | sub GetTiffToFax { | ||||||||
|
Subroutine
GetTiffToFax: not called CC=9 SCAR=45.0
Pod
undocumented
| |||||||||||
| 1185 | 0 | my ($self, %args) = @_; | |||||||||
| 1186 | |||||||||||
| 1187 | |||||||||||
| 1188 | # verify the required parameter 'name' is set | ||||||||||
| 1189 | 0 | ▶ | unless (exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1190 | 0 | croak("Missing the required parameter 'name' when calling GetTiffToFax"); | |||||||||
| 1191 | } | ||||||||||
| 1192 | |||||||||||
| 1193 | |||||||||||
| 1194 | # parse inputs | ||||||||||
| 1195 | 0 | my $_resource_path = '/imaging/tiff/{name}/toFax/?appSid={appSid}&storage={storage}&folder={folder}&outPath={outPath}'; | |||||||||
| 1196 | |||||||||||
| 1197 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 1198 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 1199 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 1200 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 1201 | |||||||||||
| 1202 | 0 | my $_method = 'GET'; | |||||||||
| 1203 | 0 | my $query_params = {}; | |||||||||
| 1204 | 0 | my $header_params = {}; | |||||||||
| 1205 | 0 | my $form_params = {}; | |||||||||
| 1206 | |||||||||||
| 1207 | # 'Accept' and 'Content-Type' header | ||||||||||
| 1208 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 1209 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1210 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 1211 | } | ||||||||||
| 1212 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | |||||||||
| 1213 | |||||||||||
| 1214 | # query params | ||||||||||
| 1215 | 0 | ▶ | if ( exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1216 | 0 | $_resource_path =~ s/\Q{name}\E/$args{'name'}/g; | |||||||||
| 1217 | }else{ | ||||||||||
| 1218 | 0 | $_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g; | |||||||||
| 1219 | }# query params | ||||||||||
| 1220 | 0 | ▶ | if ( exists $args{'storage'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1221 | 0 | $_resource_path =~ s/\Q{storage}\E/$args{'storage'}/g; | |||||||||
| 1222 | }else{ | ||||||||||
| 1223 | 0 | $_resource_path =~ s/[?&]storage.*?(?=&|\?|$)//g; | |||||||||
| 1224 | }# query params | ||||||||||
| 1225 | 0 | ▶ | if ( exists $args{'folder'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1226 | 0 | $_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g; | |||||||||
| 1227 | }else{ | ||||||||||
| 1228 | 0 | $_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g; | |||||||||
| 1229 | }# query params | ||||||||||
| 1230 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1231 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 1232 | }else{ | ||||||||||
| 1233 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 1234 | } | ||||||||||
| 1235 | |||||||||||
| 1236 | |||||||||||
| 1237 | 0 | my $_body_data; | |||||||||
| 1238 | |||||||||||
| 1239 | |||||||||||
| 1240 | |||||||||||
| 1241 | |||||||||||
| 1242 | # authentication setting, if any | ||||||||||
| 1243 | 0 | my $auth_settings = []; | |||||||||
| 1244 | |||||||||||
| 1245 | # make the API Call | ||||||||||
| 1246 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 1247 | $query_params, $form_params, | ||||||||||
| 1248 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 1249 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1250 | 0 | return; | |||||||||
| 1251 | } | ||||||||||
| 1252 | |||||||||||
| 1253 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1254 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 1255 | } | ||||||||||
| 1256 | |||||||||||
| 1257 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 1258 | 0 | return $_response_object; | |||||||||
| 1259 | |||||||||||
| 1260 | } | ||||||||||
| 1261 | # | ||||||||||
| 1262 | # PostImageOperationsSaveAs | ||||||||||
| 1263 | # | ||||||||||
| 1264 | # Perform scaling, cropping and flipping of an image in single request. Image is passed as request body. | ||||||||||
| 1265 | # | ||||||||||
| 1266 | # @param String $format Save image in another format. By default format remains the same (required) | ||||||||||
| 1267 | # @param String $newWidth New Width of the scaled image. (required) | ||||||||||
| 1268 | # @param String $newHeight New height of the scaled image. (required) | ||||||||||
| 1269 | # @param String $x X position of start point for cropping rectangle (required) | ||||||||||
| 1270 | # @param String $y Y position of start point for cropping rectangle (required) | ||||||||||
| 1271 | # @param String $rectWidth Width of cropping rectangle (required) | ||||||||||
| 1272 | # @param String $rectHeight Height of cropping rectangle (required) | ||||||||||
| 1273 | # @param String $rotateFlipMethod RotateFlip method. Default is RotateNoneFlipNone. (required) | ||||||||||
| 1274 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 1275 | # @param File $file (required) | ||||||||||
| 1276 | # @return ResponseMessage | ||||||||||
| 1277 | # | ||||||||||
| 1278 | 0 | ▶ | sub PostImageOperationsSaveAs { | ||||||||
|
Subroutine
PostImageOperationsSaveAs: not called CC=23 SCAR=63.1
Pod
undocumented
| |||||||||||
| 1279 | 0 | my ($self, %args) = @_; | |||||||||
| 1280 | |||||||||||
| 1281 | |||||||||||
| 1282 | # verify the required parameter 'format' is set | ||||||||||
| 1283 | 0 | ▶ | unless (exists $args{'format'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1284 | 0 | croak("Missing the required parameter 'format' when calling PostImageSaveAs"); | |||||||||
| 1285 | } | ||||||||||
| 1286 | |||||||||||
| 1287 | # verify the required parameter 'newWidth' is set | ||||||||||
| 1288 | 0 | ▶ | unless (exists $args{'newWidth'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1289 | 0 | croak("Missing the required parameter 'newWidth' when calling PostImageSaveAs"); | |||||||||
| 1290 | } | ||||||||||
| 1291 | |||||||||||
| 1292 | # verify the required parameter 'newHeight' is set | ||||||||||
| 1293 | 0 | ▶ | unless (exists $args{'newHeight'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1294 | 0 | croak("Missing the required parameter 'newHeight' when calling PostImageSaveAs"); | |||||||||
| 1295 | } | ||||||||||
| 1296 | |||||||||||
| 1297 | # verify the required parameter 'x' is set | ||||||||||
| 1298 | 0 | ▶ | unless (exists $args{'x'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1299 | 0 | croak("Missing the required parameter 'x' when calling PostImageSaveAs"); | |||||||||
| 1300 | } | ||||||||||
| 1301 | |||||||||||
| 1302 | # verify the required parameter 'y' is set | ||||||||||
| 1303 | 0 | ▶ | unless (exists $args{'y'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1304 | 0 | croak("Missing the required parameter 'y' when calling PostImageSaveAs"); | |||||||||
| 1305 | } | ||||||||||
| 1306 | |||||||||||
| 1307 | # verify the required parameter 'rectWidth' is set | ||||||||||
| 1308 | 0 | ▶ | unless (exists $args{'rectWidth'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1309 | 0 | croak("Missing the required parameter 'rectWidth' when calling PostImageSaveAs"); | |||||||||
| 1310 | } | ||||||||||
| 1311 | |||||||||||
| 1312 | # verify the required parameter 'rectHeight' is set | ||||||||||
| 1313 | 0 | ▶ | unless (exists $args{'rectHeight'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1314 | 0 | croak("Missing the required parameter 'rectHeight' when calling PostImageSaveAs"); | |||||||||
| 1315 | } | ||||||||||
| 1316 | |||||||||||
| 1317 | # verify the required parameter 'rotateFlipMethod' is set | ||||||||||
| 1318 | 0 | ▶ | unless (exists $args{'rotateFlipMethod'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1319 | 0 | croak("Missing the required parameter 'rotateFlipMethod' when calling PostImageSaveAs"); | |||||||||
| 1320 | } | ||||||||||
| 1321 | |||||||||||
| 1322 | # verify the required parameter 'file' is set | ||||||||||
| 1323 | 0 | ▶ | unless (exists $args{'file'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1324 | 0 | croak("Missing the required parameter 'file' when calling PostImageSaveAs"); | |||||||||
| 1325 | } | ||||||||||
| 1326 | |||||||||||
| 1327 | |||||||||||
| 1328 | # parse inputs | ||||||||||
| 1329 | 0 | my $_resource_path = '/imaging/updateImage/?appSid={appSid}&toFormat={toFormat}&newWidth={newWidth}&newHeight={newHeight}&x={x}&y={y}&rectWidth={rectWidth}&rectHeight={rectHeight}&rotateFlipMethod={rotateFlipMethod}&outPath={outPath}'; | |||||||||
| 1330 | |||||||||||
| 1331 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 1332 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 1333 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 1334 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 1335 | |||||||||||
| 1336 | 0 | my $_method = 'POST'; | |||||||||
| 1337 | 0 | my $query_params = {}; | |||||||||
| 1338 | 0 | my $header_params = {}; | |||||||||
| 1339 | 0 | my $form_params = {}; | |||||||||
| 1340 | |||||||||||
| 1341 | # 'Accept' and 'Content-Type' header | ||||||||||
| 1342 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 1343 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1344 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 1345 | } | ||||||||||
| 1346 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('multipart/form-data'); | |||||||||
| 1347 | |||||||||||
| 1348 | # query params | ||||||||||
| 1349 | 0 | ▶ | if ( exists $args{'format'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1350 | 0 | $_resource_path =~ s/\Q{format}\E/$args{'format'}/g; | |||||||||
| 1351 | }else{ | ||||||||||
| 1352 | 0 | $_resource_path =~ s/[?&]format.*?(?=&|\?|$)//g; | |||||||||
| 1353 | }# query params | ||||||||||
| 1354 | 0 | ▶ | if ( exists $args{'newWidth'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1355 | 0 | $_resource_path =~ s/\Q{newWidth}\E/$args{'newWidth'}/g; | |||||||||
| 1356 | }else{ | ||||||||||
| 1357 | 0 | $_resource_path =~ s/[?&]newWidth.*?(?=&|\?|$)//g; | |||||||||
| 1358 | }# query params | ||||||||||
| 1359 | 0 | ▶ | if ( exists $args{'newHeight'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1360 | 0 | $_resource_path =~ s/\Q{newHeight}\E/$args{'newHeight'}/g; | |||||||||
| 1361 | }else{ | ||||||||||
| 1362 | 0 | $_resource_path =~ s/[?&]newHeight.*?(?=&|\?|$)//g; | |||||||||
| 1363 | }# query params | ||||||||||
| 1364 | 0 | ▶ | if ( exists $args{'x'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1365 | 0 | $_resource_path =~ s/\Q{x}\E/$args{'x'}/g; | |||||||||
| 1366 | }else{ | ||||||||||
| 1367 | 0 | $_resource_path =~ s/[?&]x.*?(?=&|\?|$)//g; | |||||||||
| 1368 | }# query params | ||||||||||
| 1369 | 0 | ▶ | if ( exists $args{'y'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1370 | 0 | $_resource_path =~ s/\Q{y}\E/$args{'y'}/g; | |||||||||
| 1371 | }else{ | ||||||||||
| 1372 | 0 | $_resource_path =~ s/[?&]y.*?(?=&|\?|$)//g; | |||||||||
| 1373 | }# query params | ||||||||||
| 1374 | 0 | ▶ | if ( exists $args{'rectWidth'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1375 | 0 | $_resource_path =~ s/\Q{rectWidth}\E/$args{'rectWidth'}/g; | |||||||||
| 1376 | }else{ | ||||||||||
| 1377 | 0 | $_resource_path =~ s/[?&]rectWidth.*?(?=&|\?|$)//g; | |||||||||
| 1378 | }# query params | ||||||||||
| 1379 | 0 | ▶ | if ( exists $args{'rectHeight'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1380 | 0 | $_resource_path =~ s/\Q{rectHeight}\E/$args{'rectHeight'}/g; | |||||||||
| 1381 | }else{ | ||||||||||
| 1382 | 0 | $_resource_path =~ s/[?&]rectHeight.*?(?=&|\?|$)//g; | |||||||||
| 1383 | }# query params | ||||||||||
| 1384 | 0 | ▶ | if ( exists $args{'rotateFlipMethod'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1385 | 0 | $_resource_path =~ s/\Q{rotateFlipMethod}\E/$args{'rotateFlipMethod'}/g; | |||||||||
| 1386 | }else{ | ||||||||||
| 1387 | 0 | $_resource_path =~ s/[?&]rotateFlipMethod.*?(?=&|\?|$)//g; | |||||||||
| 1388 | }# query params | ||||||||||
| 1389 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1390 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 1391 | }else{ | ||||||||||
| 1392 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 1393 | } | ||||||||||
| 1394 | |||||||||||
| 1395 | |||||||||||
| 1396 | 0 | my $_body_data; | |||||||||
| 1397 | # form params | ||||||||||
| 1398 | 0 | ▶ | if ( exists $args{'file'} ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1399 | |||||||||||
| 1400 | 0 | $_body_data = read_file( $args{'file'} , binmode => ':raw' ); | |||||||||
| 1401 | |||||||||||
| 1402 | |||||||||||
| 1403 | } | ||||||||||
| 1404 | |||||||||||
| 1405 | |||||||||||
| 1406 | |||||||||||
| 1407 | # authentication setting, if any | ||||||||||
| 1408 | 0 | my $auth_settings = []; | |||||||||
| 1409 | |||||||||||
| 1410 | # make the API Call | ||||||||||
| 1411 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 1412 | $query_params, $form_params, | ||||||||||
| 1413 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 1414 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1415 | 0 | return; | |||||||||
| 1416 | } | ||||||||||
| 1417 | |||||||||||
| 1418 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1419 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 1420 | } | ||||||||||
| 1421 | |||||||||||
| 1422 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 1423 | 0 | return $_response_object; | |||||||||
| 1424 | |||||||||||
| 1425 | } | ||||||||||
| 1426 | # | ||||||||||
| 1427 | # GetImageBmp | ||||||||||
| 1428 | # | ||||||||||
| 1429 | # Update parameters of bmp image. | ||||||||||
| 1430 | # | ||||||||||
| 1431 | # @param String $name Filename of image. (required) | ||||||||||
| 1432 | # @param String $bitsPerPixel Color depth. (required) | ||||||||||
| 1433 | # @param String $horizontalResolution New horizontal resolution. (required) | ||||||||||
| 1434 | # @param String $verticalResolution New vertical resolution. (required) | ||||||||||
| 1435 | # @param Boolean $fromScratch 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. (optional) | ||||||||||
| 1436 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 1437 | # @param String $folder Folder with image to process. (optional) | ||||||||||
| 1438 | # @param String $storage (optional) | ||||||||||
| 1439 | # @return ResponseMessage | ||||||||||
| 1440 | # | ||||||||||
| 1441 | 0 | ▶ | sub GetImageBmp { | ||||||||
|
Subroutine
GetImageBmp: not called CC=16 SCAR=56.1
Pod
undocumented
| |||||||||||
| 1442 | 0 | my ($self, %args) = @_; | |||||||||
| 1443 | |||||||||||
| 1444 | |||||||||||
| 1445 | # verify the required parameter 'name' is set | ||||||||||
| 1446 | 0 | ▶ | unless (exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1447 | 0 | croak("Missing the required parameter 'name' when calling GetImageBmp"); | |||||||||
| 1448 | } | ||||||||||
| 1449 | |||||||||||
| 1450 | # verify the required parameter 'bitsPerPixel' is set | ||||||||||
| 1451 | 0 | ▶ | unless (exists $args{'bitsPerPixel'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1452 | 0 | croak("Missing the required parameter 'bitsPerPixel' when calling GetImageBmp"); | |||||||||
| 1453 | } | ||||||||||
| 1454 | |||||||||||
| 1455 | # verify the required parameter 'horizontalResolution' is set | ||||||||||
| 1456 | 0 | ▶ | unless (exists $args{'horizontalResolution'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1457 | 0 | croak("Missing the required parameter 'horizontalResolution' when calling GetImageBmp"); | |||||||||
| 1458 | } | ||||||||||
| 1459 | |||||||||||
| 1460 | # verify the required parameter 'verticalResolution' is set | ||||||||||
| 1461 | 0 | ▶ | unless (exists $args{'verticalResolution'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1462 | 0 | croak("Missing the required parameter 'verticalResolution' when calling GetImageBmp"); | |||||||||
| 1463 | } | ||||||||||
| 1464 | |||||||||||
| 1465 | |||||||||||
| 1466 | # parse inputs | ||||||||||
| 1467 | 0 | my $_resource_path = '/imaging/{name}/bmp/?appSid={appSid}&bitsPerPixel={bitsPerPixel}&horizontalResolution={horizontalResolution}&verticalResolution={verticalResolution}&fromScratch={fromScratch}&outPath={outPath}&folder={folder}&storage={storage}'; | |||||||||
| 1468 | |||||||||||
| 1469 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 1470 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 1471 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 1472 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 1473 | |||||||||||
| 1474 | 0 | my $_method = 'GET'; | |||||||||
| 1475 | 0 | my $query_params = {}; | |||||||||
| 1476 | 0 | my $header_params = {}; | |||||||||
| 1477 | 0 | my $form_params = {}; | |||||||||
| 1478 | |||||||||||
| 1479 | # 'Accept' and 'Content-Type' header | ||||||||||
| 1480 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 1481 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1482 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 1483 | } | ||||||||||
| 1484 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | |||||||||
| 1485 | |||||||||||
| 1486 | # query params | ||||||||||
| 1487 | 0 | ▶ | if ( exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1488 | 0 | $_resource_path =~ s/\Q{name}\E/$args{'name'}/g; | |||||||||
| 1489 | }else{ | ||||||||||
| 1490 | 0 | $_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g; | |||||||||
| 1491 | }# query params | ||||||||||
| 1492 | 0 | ▶ | if ( exists $args{'bitsPerPixel'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1493 | 0 | $_resource_path =~ s/\Q{bitsPerPixel}\E/$args{'bitsPerPixel'}/g; | |||||||||
| 1494 | }else{ | ||||||||||
| 1495 | 0 | $_resource_path =~ s/[?&]bitsPerPixel.*?(?=&|\?|$)//g; | |||||||||
| 1496 | }# query params | ||||||||||
| 1497 | 0 | ▶ | if ( exists $args{'horizontalResolution'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1498 | 0 | $_resource_path =~ s/\Q{horizontalResolution}\E/$args{'horizontalResolution'}/g; | |||||||||
| 1499 | }else{ | ||||||||||
| 1500 | 0 | $_resource_path =~ s/[?&]horizontalResolution.*?(?=&|\?|$)//g; | |||||||||
| 1501 | }# query params | ||||||||||
| 1502 | 0 | ▶ | if ( exists $args{'verticalResolution'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1503 | 0 | $_resource_path =~ s/\Q{verticalResolution}\E/$args{'verticalResolution'}/g; | |||||||||
| 1504 | }else{ | ||||||||||
| 1505 | 0 | $_resource_path =~ s/[?&]verticalResolution.*?(?=&|\?|$)//g; | |||||||||
| 1506 | }# query params | ||||||||||
| 1507 | 0 | ▶ | if ( exists $args{'fromScratch'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1508 | 0 | $_resource_path =~ s/\Q{fromScratch}\E/$args{'fromScratch'}/g; | |||||||||
| 1509 | }else{ | ||||||||||
| 1510 | 0 | $_resource_path =~ s/[?&]fromScratch.*?(?=&|\?|$)//g; | |||||||||
| 1511 | }# query params | ||||||||||
| 1512 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1513 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 1514 | }else{ | ||||||||||
| 1515 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 1516 | }# query params | ||||||||||
| 1517 | 0 | ▶ | if ( exists $args{'folder'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1518 | 0 | $_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g; | |||||||||
| 1519 | }else{ | ||||||||||
| 1520 | 0 | $_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g; | |||||||||
| 1521 | }# query params | ||||||||||
| 1522 | 0 | ▶ | if ( exists $args{'storage'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1523 | 0 | $_resource_path =~ s/\Q{storage}\E/$args{'storage'}/g; | |||||||||
| 1524 | }else{ | ||||||||||
| 1525 | 0 | $_resource_path =~ s/[?&]storage.*?(?=&|\?|$)//g; | |||||||||
| 1526 | } | ||||||||||
| 1527 | |||||||||||
| 1528 | |||||||||||
| 1529 | 0 | my $_body_data; | |||||||||
| 1530 | |||||||||||
| 1531 | |||||||||||
| 1532 | |||||||||||
| 1533 | |||||||||||
| 1534 | # authentication setting, if any | ||||||||||
| 1535 | 0 | my $auth_settings = []; | |||||||||
| 1536 | |||||||||||
| 1537 | # make the API Call | ||||||||||
| 1538 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 1539 | $query_params, $form_params, | ||||||||||
| 1540 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 1541 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1542 | 0 | return; | |||||||||
| 1543 | } | ||||||||||
| 1544 | |||||||||||
| 1545 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1546 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 1547 | } | ||||||||||
| 1548 | |||||||||||
| 1549 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 1550 | 0 | return $_response_object; | |||||||||
| 1551 | |||||||||||
| 1552 | } | ||||||||||
| 1553 | # | ||||||||||
| 1554 | # GetCropImage | ||||||||||
| 1555 | # | ||||||||||
| 1556 | # Crop existing image | ||||||||||
| 1557 | # | ||||||||||
| 1558 | # @param String $name The image name. (required) | ||||||||||
| 1559 | # @param String $format Output file format. Valid Formats: Bmp, png, jpg, tiff, psd, gif. (required) | ||||||||||
| 1560 | # @param String $x X position of start point for cropping rectangle (required) | ||||||||||
| 1561 | # @param String $y Y position of start point for cropping rectangle (required) | ||||||||||
| 1562 | # @param String $width Width of cropping rectangle (required) | ||||||||||
| 1563 | # @param String $height Height of cropping rectangle (required) | ||||||||||
| 1564 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 1565 | # @param String $folder Folder with image to process. (optional) | ||||||||||
| 1566 | # @param String $storage (optional) | ||||||||||
| 1567 | # @return ResponseMessage | ||||||||||
| 1568 | # | ||||||||||
| 1569 | 0 | ▶ | sub GetCropImage { | ||||||||
|
Subroutine
GetCropImage: not called CC=19 SCAR=59.4
Pod
undocumented
| |||||||||||
| 1570 | 0 | my ($self, %args) = @_; | |||||||||
| 1571 | |||||||||||
| 1572 | |||||||||||
| 1573 | # verify the required parameter 'name' is set | ||||||||||
| 1574 | 0 | ▶ | unless (exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1575 | 0 | croak("Missing the required parameter 'name' when calling GetCropImage"); | |||||||||
| 1576 | } | ||||||||||
| 1577 | |||||||||||
| 1578 | # verify the required parameter 'format' is set | ||||||||||
| 1579 | 0 | ▶ | unless (exists $args{'format'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1580 | 0 | croak("Missing the required parameter 'format' when calling GetCropImage"); | |||||||||
| 1581 | } | ||||||||||
| 1582 | |||||||||||
| 1583 | # verify the required parameter 'x' is set | ||||||||||
| 1584 | 0 | ▶ | unless (exists $args{'x'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1585 | 0 | croak("Missing the required parameter 'x' when calling GetCropImage"); | |||||||||
| 1586 | } | ||||||||||
| 1587 | |||||||||||
| 1588 | # verify the required parameter 'y' is set | ||||||||||
| 1589 | 0 | ▶ | unless (exists $args{'y'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1590 | 0 | croak("Missing the required parameter 'y' when calling GetCropImage"); | |||||||||
| 1591 | } | ||||||||||
| 1592 | |||||||||||
| 1593 | # verify the required parameter 'width' is set | ||||||||||
| 1594 | 0 | ▶ | unless (exists $args{'width'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1595 | 0 | croak("Missing the required parameter 'width' when calling GetCropImage"); | |||||||||
| 1596 | } | ||||||||||
| 1597 | |||||||||||
| 1598 | # verify the required parameter 'height' is set | ||||||||||
| 1599 | 0 | ▶ | unless (exists $args{'height'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1600 | 0 | croak("Missing the required parameter 'height' when calling GetCropImage"); | |||||||||
| 1601 | } | ||||||||||
| 1602 | |||||||||||
| 1603 | |||||||||||
| 1604 | # parse inputs | ||||||||||
| 1605 | 0 | my $_resource_path = '/imaging/{name}/crop/?appSid={appSid}&toFormat={toFormat}&x={x}&y={y}&width={width}&height={height}&outPath={outPath}&folder={folder}&storage={storage}'; | |||||||||
| 1606 | |||||||||||
| 1607 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 1608 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 1609 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 1610 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 1611 | |||||||||||
| 1612 | 0 | my $_method = 'GET'; | |||||||||
| 1613 | 0 | my $query_params = {}; | |||||||||
| 1614 | 0 | my $header_params = {}; | |||||||||
| 1615 | 0 | my $form_params = {}; | |||||||||
| 1616 | |||||||||||
| 1617 | # 'Accept' and 'Content-Type' header | ||||||||||
| 1618 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 1619 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1620 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 1621 | } | ||||||||||
| 1622 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | |||||||||
| 1623 | |||||||||||
| 1624 | # query params | ||||||||||
| 1625 | 0 | ▶ | if ( exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1626 | 0 | $_resource_path =~ s/\Q{name}\E/$args{'name'}/g; | |||||||||
| 1627 | }else{ | ||||||||||
| 1628 | 0 | $_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g; | |||||||||
| 1629 | }# query params | ||||||||||
| 1630 | 0 | ▶ | if ( exists $args{'format'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1631 | 0 | $_resource_path =~ s/\Q{format}\E/$args{'format'}/g; | |||||||||
| 1632 | }else{ | ||||||||||
| 1633 | 0 | $_resource_path =~ s/[?&]format.*?(?=&|\?|$)//g; | |||||||||
| 1634 | }# query params | ||||||||||
| 1635 | 0 | ▶ | if ( exists $args{'x'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1636 | 0 | $_resource_path =~ s/\Q{x}\E/$args{'x'}/g; | |||||||||
| 1637 | }else{ | ||||||||||
| 1638 | 0 | $_resource_path =~ s/[?&]x.*?(?=&|\?|$)//g; | |||||||||
| 1639 | }# query params | ||||||||||
| 1640 | 0 | ▶ | if ( exists $args{'y'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1641 | 0 | $_resource_path =~ s/\Q{y}\E/$args{'y'}/g; | |||||||||
| 1642 | }else{ | ||||||||||
| 1643 | 0 | $_resource_path =~ s/[?&]y.*?(?=&|\?|$)//g; | |||||||||
| 1644 | }# query params | ||||||||||
| 1645 | 0 | ▶ | if ( exists $args{'width'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1646 | 0 | $_resource_path =~ s/\Q{width}\E/$args{'width'}/g; | |||||||||
| 1647 | }else{ | ||||||||||
| 1648 | 0 | $_resource_path =~ s/[?&]width.*?(?=&|\?|$)//g; | |||||||||
| 1649 | }# query params | ||||||||||
| 1650 | 0 | ▶ | if ( exists $args{'height'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1651 | 0 | $_resource_path =~ s/\Q{height}\E/$args{'height'}/g; | |||||||||
| 1652 | }else{ | ||||||||||
| 1653 | 0 | $_resource_path =~ s/[?&]height.*?(?=&|\?|$)//g; | |||||||||
| 1654 | }# query params | ||||||||||
| 1655 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1656 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 1657 | }else{ | ||||||||||
| 1658 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 1659 | }# query params | ||||||||||
| 1660 | 0 | ▶ | if ( exists $args{'folder'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1661 | 0 | $_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g; | |||||||||
| 1662 | }else{ | ||||||||||
| 1663 | 0 | $_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g; | |||||||||
| 1664 | }# query params | ||||||||||
| 1665 | 0 | ▶ | if ( exists $args{'storage'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1666 | 0 | $_resource_path =~ s/\Q{storage}\E/$args{'storage'}/g; | |||||||||
| 1667 | }else{ | ||||||||||
| 1668 | 0 | $_resource_path =~ s/[?&]storage.*?(?=&|\?|$)//g; | |||||||||
| 1669 | } | ||||||||||
| 1670 | |||||||||||
| 1671 | |||||||||||
| 1672 | 0 | my $_body_data; | |||||||||
| 1673 | |||||||||||
| 1674 | |||||||||||
| 1675 | |||||||||||
| 1676 | |||||||||||
| 1677 | # authentication setting, if any | ||||||||||
| 1678 | 0 | my $auth_settings = []; | |||||||||
| 1679 | |||||||||||
| 1680 | # make the API Call | ||||||||||
| 1681 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 1682 | $query_params, $form_params, | ||||||||||
| 1683 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 1684 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1685 | 0 | return; | |||||||||
| 1686 | } | ||||||||||
| 1687 | |||||||||||
| 1688 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1689 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 1690 | } | ||||||||||
| 1691 | |||||||||||
| 1692 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 1693 | 0 | return $_response_object; | |||||||||
| 1694 | |||||||||||
| 1695 | } | ||||||||||
| 1696 | # | ||||||||||
| 1697 | # GetImageFrame | ||||||||||
| 1698 | # | ||||||||||
| 1699 | # Get separate frame of tiff image | ||||||||||
| 1700 | # | ||||||||||
| 1701 | # @param String $name Filename of image. (required) | ||||||||||
| 1702 | # @param String $frameId Number of frame. (required) | ||||||||||
| 1703 | # @param String $newWidth New width of the scaled image. (optional) | ||||||||||
| 1704 | # @param String $newHeight New height of the scaled image. (optional) | ||||||||||
| 1705 | # @param String $x X position of start point for cropping rectangle (optional) | ||||||||||
| 1706 | # @param String $y Y position of start point for cropping rectangle (optional) | ||||||||||
| 1707 | # @param String $rectWidth Width of cropping rectangle (optional) | ||||||||||
| 1708 | # @param String $rectHeight Height of cropping rectangle (optional) | ||||||||||
| 1709 | # @param String $rotateFlipMethod RotateFlip method.(Rotate180FlipNone, Rotate180FlipX, Rotate180FlipXY, Rotate180FlipY, Rotate270FlipNone, Rotate270FlipX, Rotate270FlipXY, Rotate270FlipY, Rotate90FlipNone, Rotate90FlipX, Rotate90FlipXY, Rotate90FlipY, RotateNoneFlipNone, RotateNoneFlipX, RotateNoneFlipXY, RotateNoneFlipY. Default is RotateNoneFlipNone.) (optional) | ||||||||||
| 1710 | # @param Boolean $saveOtherFrames Include all other frames or just specified frame in response. (optional) | ||||||||||
| 1711 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 1712 | # @param String $folder Folder with image to process. (optional) | ||||||||||
| 1713 | # @param String $storage (optional) | ||||||||||
| 1714 | # @return ResponseMessage | ||||||||||
| 1715 | # | ||||||||||
| 1716 | 0 | ▶ | sub GetImageFrame { | ||||||||
|
Subroutine
GetImageFrame: not called CC=19 SCAR=59.4
Pod
undocumented
| |||||||||||
| 1717 | 0 | my ($self, %args) = @_; | |||||||||
| 1718 | |||||||||||
| 1719 | |||||||||||
| 1720 | # verify the required parameter 'name' is set | ||||||||||
| 1721 | 0 | ▶ | unless (exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1722 | 0 | croak("Missing the required parameter 'name' when calling GetImageFrame"); | |||||||||
| 1723 | } | ||||||||||
| 1724 | |||||||||||
| 1725 | # verify the required parameter 'frameId' is set | ||||||||||
| 1726 | 0 | ▶ | unless (exists $args{'frameId'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1727 | 0 | croak("Missing the required parameter 'frameId' when calling GetImageFrame"); | |||||||||
| 1728 | } | ||||||||||
| 1729 | |||||||||||
| 1730 | |||||||||||
| 1731 | # parse inputs | ||||||||||
| 1732 | 0 | my $_resource_path = '/imaging/{name}/frames/{frameId}/?appSid={appSid}&newWidth={newWidth}&newHeight={newHeight}&x={x}&y={y}&rectWidth={rectWidth}&rectHeight={rectHeight}&rotateFlipMethod={rotateFlipMethod}&saveOtherFrames={saveOtherFrames}&outPath={outPath}&folder={folder}&storage={storage}'; | |||||||||
| 1733 | |||||||||||
| 1734 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 1735 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 1736 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 1737 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 1738 | |||||||||||
| 1739 | 0 | my $_method = 'GET'; | |||||||||
| 1740 | 0 | my $query_params = {}; | |||||||||
| 1741 | 0 | my $header_params = {}; | |||||||||
| 1742 | 0 | my $form_params = {}; | |||||||||
| 1743 | |||||||||||
| 1744 | # 'Accept' and 'Content-Type' header | ||||||||||
| 1745 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 1746 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1747 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 1748 | } | ||||||||||
| 1749 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | |||||||||
| 1750 | |||||||||||
| 1751 | # query params | ||||||||||
| 1752 | 0 | ▶ | if ( exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1753 | 0 | $_resource_path =~ s/\Q{name}\E/$args{'name'}/g; | |||||||||
| 1754 | }else{ | ||||||||||
| 1755 | 0 | $_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g; | |||||||||
| 1756 | }# query params | ||||||||||
| 1757 | 0 | ▶ | if ( exists $args{'frameId'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1758 | 0 | $_resource_path =~ s/\Q{frameId}\E/$args{'frameId'}/g; | |||||||||
| 1759 | }else{ | ||||||||||
| 1760 | 0 | $_resource_path =~ s/[?&]frameId.*?(?=&|\?|$)//g; | |||||||||
| 1761 | }# query params | ||||||||||
| 1762 | 0 | ▶ | if ( exists $args{'newWidth'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1763 | 0 | $_resource_path =~ s/\Q{newWidth}\E/$args{'newWidth'}/g; | |||||||||
| 1764 | }else{ | ||||||||||
| 1765 | 0 | $_resource_path =~ s/[?&]newWidth.*?(?=&|\?|$)//g; | |||||||||
| 1766 | }# query params | ||||||||||
| 1767 | 0 | ▶ | if ( exists $args{'newHeight'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1768 | 0 | $_resource_path =~ s/\Q{newHeight}\E/$args{'newHeight'}/g; | |||||||||
| 1769 | }else{ | ||||||||||
| 1770 | 0 | $_resource_path =~ s/[?&]newHeight.*?(?=&|\?|$)//g; | |||||||||
| 1771 | }# query params | ||||||||||
| 1772 | 0 | ▶ | if ( exists $args{'x'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1773 | 0 | $_resource_path =~ s/\Q{x}\E/$args{'x'}/g; | |||||||||
| 1774 | }else{ | ||||||||||
| 1775 | 0 | $_resource_path =~ s/[?&]x.*?(?=&|\?|$)//g; | |||||||||
| 1776 | }# query params | ||||||||||
| 1777 | 0 | ▶ | if ( exists $args{'y'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1778 | 0 | $_resource_path =~ s/\Q{y}\E/$args{'y'}/g; | |||||||||
| 1779 | }else{ | ||||||||||
| 1780 | 0 | $_resource_path =~ s/[?&]y.*?(?=&|\?|$)//g; | |||||||||
| 1781 | }# query params | ||||||||||
| 1782 | 0 | ▶ | if ( exists $args{'rectWidth'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1783 | 0 | $_resource_path =~ s/\Q{rectWidth}\E/$args{'rectWidth'}/g; | |||||||||
| 1784 | }else{ | ||||||||||
| 1785 | 0 | $_resource_path =~ s/[?&]rectWidth.*?(?=&|\?|$)//g; | |||||||||
| 1786 | }# query params | ||||||||||
| 1787 | 0 | ▶ | if ( exists $args{'rectHeight'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1788 | 0 | $_resource_path =~ s/\Q{rectHeight}\E/$args{'rectHeight'}/g; | |||||||||
| 1789 | }else{ | ||||||||||
| 1790 | 0 | $_resource_path =~ s/[?&]rectHeight.*?(?=&|\?|$)//g; | |||||||||
| 1791 | }# query params | ||||||||||
| 1792 | 0 | ▶ | if ( exists $args{'rotateFlipMethod'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1793 | 0 | $_resource_path =~ s/\Q{rotateFlipMethod}\E/$args{'rotateFlipMethod'}/g; | |||||||||
| 1794 | }else{ | ||||||||||
| 1795 | 0 | $_resource_path =~ s/[?&]rotateFlipMethod.*?(?=&|\?|$)//g; | |||||||||
| 1796 | }# query params | ||||||||||
| 1797 | 0 | ▶ | if ( exists $args{'saveOtherFrames'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1798 | 0 | $_resource_path =~ s/\Q{saveOtherFrames}\E/$args{'saveOtherFrames'}/g; | |||||||||
| 1799 | }else{ | ||||||||||
| 1800 | 0 | $_resource_path =~ s/[?&]saveOtherFrames.*?(?=&|\?|$)//g; | |||||||||
| 1801 | }# query params | ||||||||||
| 1802 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1803 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 1804 | }else{ | ||||||||||
| 1805 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 1806 | }# query params | ||||||||||
| 1807 | 0 | ▶ | if ( exists $args{'folder'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1808 | 0 | $_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g; | |||||||||
| 1809 | }else{ | ||||||||||
| 1810 | 0 | $_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g; | |||||||||
| 1811 | }# query params | ||||||||||
| 1812 | 0 | ▶ | if ( exists $args{'storage'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1813 | 0 | $_resource_path =~ s/\Q{storage}\E/$args{'storage'}/g; | |||||||||
| 1814 | }else{ | ||||||||||
| 1815 | 0 | $_resource_path =~ s/[?&]storage.*?(?=&|\?|$)//g; | |||||||||
| 1816 | } | ||||||||||
| 1817 | |||||||||||
| 1818 | |||||||||||
| 1819 | 0 | my $_body_data; | |||||||||
| 1820 | |||||||||||
| 1821 | |||||||||||
| 1822 | |||||||||||
| 1823 | |||||||||||
| 1824 | # authentication setting, if any | ||||||||||
| 1825 | 0 | my $auth_settings = []; | |||||||||
| 1826 | |||||||||||
| 1827 | # make the API Call | ||||||||||
| 1828 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 1829 | $query_params, $form_params, | ||||||||||
| 1830 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 1831 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1832 | 0 | return; | |||||||||
| 1833 | } | ||||||||||
| 1834 | |||||||||||
| 1835 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1836 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 1837 | } | ||||||||||
| 1838 | |||||||||||
| 1839 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 1840 | 0 | return $_response_object; | |||||||||
| 1841 | |||||||||||
| 1842 | } | ||||||||||
| 1843 | # | ||||||||||
| 1844 | # GetImageFrameProperties | ||||||||||
| 1845 | # | ||||||||||
| 1846 | # Get properties of a tiff frame. | ||||||||||
| 1847 | # | ||||||||||
| 1848 | # @param String $name Filename with image. (required) | ||||||||||
| 1849 | # @param String $frameId Number of frame. (required) | ||||||||||
| 1850 | # @param String $folder Folder with image to process. (optional) | ||||||||||
| 1851 | # @param String $storage (optional) | ||||||||||
| 1852 | # @return ImagingResponse | ||||||||||
| 1853 | # | ||||||||||
| 1854 | 0 | ▶ | sub GetImageFrameProperties { | ||||||||
|
Subroutine
GetImageFrameProperties: not called CC=10 SCAR=47.0
Pod
undocumented
| |||||||||||
| 1855 | 0 | my ($self, %args) = @_; | |||||||||
| 1856 | |||||||||||
| 1857 | |||||||||||
| 1858 | # verify the required parameter 'name' is set | ||||||||||
| 1859 | 0 | ▶ | unless (exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1860 | 0 | croak("Missing the required parameter 'name' when calling GetImageFrameProperties"); | |||||||||
| 1861 | } | ||||||||||
| 1862 | |||||||||||
| 1863 | # verify the required parameter 'frameId' is set | ||||||||||
| 1864 | 0 | ▶ | unless (exists $args{'frameId'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1865 | 0 | croak("Missing the required parameter 'frameId' when calling GetImageFrameProperties"); | |||||||||
| 1866 | } | ||||||||||
| 1867 | |||||||||||
| 1868 | |||||||||||
| 1869 | # parse inputs | ||||||||||
| 1870 | 0 | my $_resource_path = '/imaging/{name}/frames/{frameId}/properties/?appSid={appSid}&folder={folder}&storage={storage}'; | |||||||||
| 1871 | |||||||||||
| 1872 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 1873 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 1874 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 1875 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 1876 | |||||||||||
| 1877 | 0 | my $_method = 'GET'; | |||||||||
| 1878 | 0 | my $query_params = {}; | |||||||||
| 1879 | 0 | my $header_params = {}; | |||||||||
| 1880 | 0 | my $form_params = {}; | |||||||||
| 1881 | |||||||||||
| 1882 | # 'Accept' and 'Content-Type' header | ||||||||||
| 1883 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json'); | |||||||||
| 1884 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1885 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 1886 | } | ||||||||||
| 1887 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | |||||||||
| 1888 | |||||||||||
| 1889 | # query params | ||||||||||
| 1890 | 0 | ▶ | if ( exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1891 | 0 | $_resource_path =~ s/\Q{name}\E/$args{'name'}/g; | |||||||||
| 1892 | }else{ | ||||||||||
| 1893 | 0 | $_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g; | |||||||||
| 1894 | }# query params | ||||||||||
| 1895 | 0 | ▶ | if ( exists $args{'frameId'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1896 | 0 | $_resource_path =~ s/\Q{frameId}\E/$args{'frameId'}/g; | |||||||||
| 1897 | }else{ | ||||||||||
| 1898 | 0 | $_resource_path =~ s/[?&]frameId.*?(?=&|\?|$)//g; | |||||||||
| 1899 | }# query params | ||||||||||
| 1900 | 0 | ▶ | if ( exists $args{'folder'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1901 | 0 | $_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g; | |||||||||
| 1902 | }else{ | ||||||||||
| 1903 | 0 | $_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g; | |||||||||
| 1904 | }# query params | ||||||||||
| 1905 | 0 | ▶ | if ( exists $args{'storage'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1906 | 0 | $_resource_path =~ s/\Q{storage}\E/$args{'storage'}/g; | |||||||||
| 1907 | }else{ | ||||||||||
| 1908 | 0 | $_resource_path =~ s/[?&]storage.*?(?=&|\?|$)//g; | |||||||||
| 1909 | } | ||||||||||
| 1910 | |||||||||||
| 1911 | |||||||||||
| 1912 | 0 | my $_body_data; | |||||||||
| 1913 | |||||||||||
| 1914 | |||||||||||
| 1915 | |||||||||||
| 1916 | |||||||||||
| 1917 | # authentication setting, if any | ||||||||||
| 1918 | 0 | my $auth_settings = []; | |||||||||
| 1919 | |||||||||||
| 1920 | # make the API Call | ||||||||||
| 1921 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 1922 | $query_params, $form_params, | ||||||||||
| 1923 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 1924 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1925 | 0 | return; | |||||||||
| 1926 | } | ||||||||||
| 1927 | |||||||||||
| 1928 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1929 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 1930 | } | ||||||||||
| 1931 | |||||||||||
| 1932 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ImagingResponse', $response->header('content-type')); | |||||||||
| 1933 | 0 | return $_response_object; | |||||||||
| 1934 | |||||||||||
| 1935 | } | ||||||||||
| 1936 | # | ||||||||||
| 1937 | # GetImageGif | ||||||||||
| 1938 | # | ||||||||||
| 1939 | # Update parameters of bmp image. | ||||||||||
| 1940 | # | ||||||||||
| 1941 | # @param String $name Filename of image. (required) | ||||||||||
| 1942 | # @param String $backgroundColorIndex Index of the background color. (optional) | ||||||||||
| 1943 | # @param String $colorResolution Color resolution. (optional) | ||||||||||
| 1944 | # @param Boolean $hasTrailer Specifies if image has trailer. (optional) | ||||||||||
| 1945 | # @param Boolean $interlaced Specifies if image is interlaced. (optional) | ||||||||||
| 1946 | # @param Boolean $isPaletteSorted Specifies if palette is sorted. (optional) | ||||||||||
| 1947 | # @param String $pixelAspectRatio Pixel aspect ratio. (optional) | ||||||||||
| 1948 | # @param Boolean $fromScratch 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. (optional) | ||||||||||
| 1949 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 1950 | # @param String $folder Folder with image to process. (optional) | ||||||||||
| 1951 | # @param String $storage (optional) | ||||||||||
| 1952 | # @return ResponseMessage | ||||||||||
| 1953 | # | ||||||||||
| 1954 | 0 | ▶ | sub GetImageGif { | ||||||||
|
Subroutine
GetImageGif: not called CC=16 SCAR=56.1
Pod
undocumented
| |||||||||||
| 1955 | 0 | my ($self, %args) = @_; | |||||||||
| 1956 | |||||||||||
| 1957 | |||||||||||
| 1958 | # verify the required parameter 'name' is set | ||||||||||
| 1959 | 0 | ▶ | unless (exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1960 | 0 | croak("Missing the required parameter 'name' when calling GetImageGif"); | |||||||||
| 1961 | } | ||||||||||
| 1962 | |||||||||||
| 1963 | |||||||||||
| 1964 | # parse inputs | ||||||||||
| 1965 | 0 | my $_resource_path = '/imaging/{name}/gif/?appSid={appSid}&backgroundColorIndex={backgroundColorIndex}&colorResolution={colorResolution}&hasTrailer={hasTrailer}&interlaced={interlaced}&isPaletteSorted={isPaletteSorted}&pixelAspectRatio={pixelAspectRatio}&fromScratch={fromScratch}&outPath={outPath}&folder={folder}&storage={storage}'; | |||||||||
| 1966 | |||||||||||
| 1967 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 1968 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 1969 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 1970 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 1971 | |||||||||||
| 1972 | 0 | my $_method = 'GET'; | |||||||||
| 1973 | 0 | my $query_params = {}; | |||||||||
| 1974 | 0 | my $header_params = {}; | |||||||||
| 1975 | 0 | my $form_params = {}; | |||||||||
| 1976 | |||||||||||
| 1977 | # 'Accept' and 'Content-Type' header | ||||||||||
| 1978 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 1979 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1980 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 1981 | } | ||||||||||
| 1982 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | |||||||||
| 1983 | |||||||||||
| 1984 | # query params | ||||||||||
| 1985 | 0 | ▶ | if ( exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1986 | 0 | $_resource_path =~ s/\Q{name}\E/$args{'name'}/g; | |||||||||
| 1987 | }else{ | ||||||||||
| 1988 | 0 | $_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g; | |||||||||
| 1989 | }# query params | ||||||||||
| 1990 | 0 | ▶ | if ( exists $args{'backgroundColorIndex'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1991 | 0 | $_resource_path =~ s/\Q{backgroundColorIndex}\E/$args{'backgroundColorIndex'}/g; | |||||||||
| 1992 | }else{ | ||||||||||
| 1993 | 0 | $_resource_path =~ s/[?&]backgroundColorIndex.*?(?=&|\?|$)//g; | |||||||||
| 1994 | }# query params | ||||||||||
| 1995 | 0 | ▶ | if ( exists $args{'colorResolution'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 1996 | 0 | $_resource_path =~ s/\Q{colorResolution}\E/$args{'colorResolution'}/g; | |||||||||
| 1997 | }else{ | ||||||||||
| 1998 | 0 | $_resource_path =~ s/[?&]colorResolution.*?(?=&|\?|$)//g; | |||||||||
| 1999 | }# query params | ||||||||||
| 2000 | 0 | ▶ | if ( exists $args{'hasTrailer'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2001 | 0 | $_resource_path =~ s/\Q{hasTrailer}\E/$args{'hasTrailer'}/g; | |||||||||
| 2002 | }else{ | ||||||||||
| 2003 | 0 | $_resource_path =~ s/[?&]hasTrailer.*?(?=&|\?|$)//g; | |||||||||
| 2004 | }# query params | ||||||||||
| 2005 | 0 | ▶ | if ( exists $args{'interlaced'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2006 | 0 | $_resource_path =~ s/\Q{interlaced}\E/$args{'interlaced'}/g; | |||||||||
| 2007 | }else{ | ||||||||||
| 2008 | 0 | $_resource_path =~ s/[?&]interlaced.*?(?=&|\?|$)//g; | |||||||||
| 2009 | }# query params | ||||||||||
| 2010 | 0 | ▶ | if ( exists $args{'isPaletteSorted'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2011 | 0 | $_resource_path =~ s/\Q{isPaletteSorted}\E/$args{'isPaletteSorted'}/g; | |||||||||
| 2012 | }else{ | ||||||||||
| 2013 | 0 | $_resource_path =~ s/[?&]isPaletteSorted.*?(?=&|\?|$)//g; | |||||||||
| 2014 | }# query params | ||||||||||
| 2015 | 0 | ▶ | if ( exists $args{'pixelAspectRatio'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2016 | 0 | $_resource_path =~ s/\Q{pixelAspectRatio}\E/$args{'pixelAspectRatio'}/g; | |||||||||
| 2017 | }else{ | ||||||||||
| 2018 | 0 | $_resource_path =~ s/[?&]pixelAspectRatio.*?(?=&|\?|$)//g; | |||||||||
| 2019 | }# query params | ||||||||||
| 2020 | 0 | ▶ | if ( exists $args{'fromScratch'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2021 | 0 | $_resource_path =~ s/\Q{fromScratch}\E/$args{'fromScratch'}/g; | |||||||||
| 2022 | }else{ | ||||||||||
| 2023 | 0 | $_resource_path =~ s/[?&]fromScratch.*?(?=&|\?|$)//g; | |||||||||
| 2024 | }# query params | ||||||||||
| 2025 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2026 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 2027 | }else{ | ||||||||||
| 2028 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 2029 | }# query params | ||||||||||
| 2030 | 0 | ▶ | if ( exists $args{'folder'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2031 | 0 | $_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g; | |||||||||
| 2032 | }else{ | ||||||||||
| 2033 | 0 | $_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g; | |||||||||
| 2034 | }# query params | ||||||||||
| 2035 | 0 | ▶ | if ( exists $args{'storage'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2036 | 0 | $_resource_path =~ s/\Q{storage}\E/$args{'storage'}/g; | |||||||||
| 2037 | }else{ | ||||||||||
| 2038 | 0 | $_resource_path =~ s/[?&]storage.*?(?=&|\?|$)//g; | |||||||||
| 2039 | } | ||||||||||
| 2040 | |||||||||||
| 2041 | |||||||||||
| 2042 | 0 | my $_body_data; | |||||||||
| 2043 | |||||||||||
| 2044 | |||||||||||
| 2045 | |||||||||||
| 2046 | |||||||||||
| 2047 | # authentication setting, if any | ||||||||||
| 2048 | 0 | my $auth_settings = []; | |||||||||
| 2049 | |||||||||||
| 2050 | # make the API Call | ||||||||||
| 2051 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 2052 | $query_params, $form_params, | ||||||||||
| 2053 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 2054 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2055 | 0 | return; | |||||||||
| 2056 | } | ||||||||||
| 2057 | |||||||||||
| 2058 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2059 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 2060 | } | ||||||||||
| 2061 | |||||||||||
| 2062 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 2063 | 0 | return $_response_object; | |||||||||
| 2064 | |||||||||||
| 2065 | } | ||||||||||
| 2066 | # | ||||||||||
| 2067 | # GetImageJpg | ||||||||||
| 2068 | # | ||||||||||
| 2069 | # Update parameters of jpg image. | ||||||||||
| 2070 | # | ||||||||||
| 2071 | # @param String $name Filename of image. (required) | ||||||||||
| 2072 | # @param String $quality Quality of image. From 0 to 100. Default is 75 (optional) | ||||||||||
| 2073 | # @param String $compressionType Compression type. (optional) | ||||||||||
| 2074 | # @param Boolean $fromScratch 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. (optional) | ||||||||||
| 2075 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 2076 | # @param String $folder Folder with image to process. (optional) | ||||||||||
| 2077 | # @param String $storage (optional) | ||||||||||
| 2078 | # @return ResponseMessage | ||||||||||
| 2079 | # | ||||||||||
| 2080 | 0 | ▶ | sub GetImageJpg { | ||||||||
|
Subroutine
GetImageJpg: not called CC=12 SCAR=50.5
Pod
undocumented
| |||||||||||
| 2081 | 0 | my ($self, %args) = @_; | |||||||||
| 2082 | |||||||||||
| 2083 | |||||||||||
| 2084 | # verify the required parameter 'name' is set | ||||||||||
| 2085 | 0 | ▶ | unless (exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2086 | 0 | croak("Missing the required parameter 'name' when calling GetImageJpg"); | |||||||||
| 2087 | } | ||||||||||
| 2088 | |||||||||||
| 2089 | |||||||||||
| 2090 | # parse inputs | ||||||||||
| 2091 | 0 | my $_resource_path = '/imaging/{name}/jpg/?appSid={appSid}&quality={quality}&compressionType={compressionType}&fromScratch={fromScratch}&outPath={outPath}&folder={folder}&storage={storage}'; | |||||||||
| 2092 | |||||||||||
| 2093 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 2094 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 2095 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 2096 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 2097 | |||||||||||
| 2098 | 0 | my $_method = 'GET'; | |||||||||
| 2099 | 0 | my $query_params = {}; | |||||||||
| 2100 | 0 | my $header_params = {}; | |||||||||
| 2101 | 0 | my $form_params = {}; | |||||||||
| 2102 | |||||||||||
| 2103 | # 'Accept' and 'Content-Type' header | ||||||||||
| 2104 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 2105 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2106 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 2107 | } | ||||||||||
| 2108 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | |||||||||
| 2109 | |||||||||||
| 2110 | # query params | ||||||||||
| 2111 | 0 | ▶ | if ( exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2112 | 0 | $_resource_path =~ s/\Q{name}\E/$args{'name'}/g; | |||||||||
| 2113 | }else{ | ||||||||||
| 2114 | 0 | $_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g; | |||||||||
| 2115 | }# query params | ||||||||||
| 2116 | 0 | ▶ | if ( exists $args{'quality'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2117 | 0 | $_resource_path =~ s/\Q{quality}\E/$args{'quality'}/g; | |||||||||
| 2118 | }else{ | ||||||||||
| 2119 | 0 | $_resource_path =~ s/[?&]quality.*?(?=&|\?|$)//g; | |||||||||
| 2120 | }# query params | ||||||||||
| 2121 | 0 | ▶ | if ( exists $args{'compressionType'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2122 | 0 | $_resource_path =~ s/\Q{compressionType}\E/$args{'compressionType'}/g; | |||||||||
| 2123 | }else{ | ||||||||||
| 2124 | 0 | $_resource_path =~ s/[?&]compressionType.*?(?=&|\?|$)//g; | |||||||||
| 2125 | }# query params | ||||||||||
| 2126 | 0 | ▶ | if ( exists $args{'fromScratch'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2127 | 0 | $_resource_path =~ s/\Q{fromScratch}\E/$args{'fromScratch'}/g; | |||||||||
| 2128 | }else{ | ||||||||||
| 2129 | 0 | $_resource_path =~ s/[?&]fromScratch.*?(?=&|\?|$)//g; | |||||||||
| 2130 | }# query params | ||||||||||
| 2131 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2132 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 2133 | }else{ | ||||||||||
| 2134 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 2135 | }# query params | ||||||||||
| 2136 | 0 | ▶ | if ( exists $args{'folder'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2137 | 0 | $_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g; | |||||||||
| 2138 | }else{ | ||||||||||
| 2139 | 0 | $_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g; | |||||||||
| 2140 | }# query params | ||||||||||
| 2141 | 0 | ▶ | if ( exists $args{'storage'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2142 | 0 | $_resource_path =~ s/\Q{storage}\E/$args{'storage'}/g; | |||||||||
| 2143 | }else{ | ||||||||||
| 2144 | 0 | $_resource_path =~ s/[?&]storage.*?(?=&|\?|$)//g; | |||||||||
| 2145 | } | ||||||||||
| 2146 | |||||||||||
| 2147 | |||||||||||
| 2148 | 0 | my $_body_data; | |||||||||
| 2149 | |||||||||||
| 2150 | |||||||||||
| 2151 | |||||||||||
| 2152 | |||||||||||
| 2153 | # authentication setting, if any | ||||||||||
| 2154 | 0 | my $auth_settings = []; | |||||||||
| 2155 | |||||||||||
| 2156 | # make the API Call | ||||||||||
| 2157 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 2158 | $query_params, $form_params, | ||||||||||
| 2159 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 2160 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2161 | 0 | return; | |||||||||
| 2162 | } | ||||||||||
| 2163 | |||||||||||
| 2164 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2165 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 2166 | } | ||||||||||
| 2167 | |||||||||||
| 2168 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 2169 | 0 | return $_response_object; | |||||||||
| 2170 | |||||||||||
| 2171 | } | ||||||||||
| 2172 | # | ||||||||||
| 2173 | # GetImagePng | ||||||||||
| 2174 | # | ||||||||||
| 2175 | # Update parameters of png image. | ||||||||||
| 2176 | # | ||||||||||
| 2177 | # @param String $name Filename of image. (required) | ||||||||||
| 2178 | # @param Boolean $fromScratch 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. (optional) | ||||||||||
| 2179 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 2180 | # @param String $folder Folder with image to process. (optional) | ||||||||||
| 2181 | # @param String $storage (optional) | ||||||||||
| 2182 | # @return ResponseMessage | ||||||||||
| 2183 | # | ||||||||||
| 2184 | 0 | ▶ | sub GetImagePng { | ||||||||
|
Subroutine
GetImagePng: not called CC=10 SCAR=47.0
Pod
undocumented
| |||||||||||
| 2185 | 0 | my ($self, %args) = @_; | |||||||||
| 2186 | |||||||||||
| 2187 | |||||||||||
| 2188 | # verify the required parameter 'name' is set | ||||||||||
| 2189 | 0 | ▶ | unless (exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2190 | 0 | croak("Missing the required parameter 'name' when calling GetImagePng"); | |||||||||
| 2191 | } | ||||||||||
| 2192 | |||||||||||
| 2193 | |||||||||||
| 2194 | # parse inputs | ||||||||||
| 2195 | 0 | my $_resource_path = '/imaging/{name}/png/?appSid={appSid}&fromScratch={fromScratch}&outPath={outPath}&folder={folder}&storage={storage}'; | |||||||||
| 2196 | |||||||||||
| 2197 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 2198 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 2199 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 2200 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 2201 | |||||||||||
| 2202 | 0 | my $_method = 'GET'; | |||||||||
| 2203 | 0 | my $query_params = {}; | |||||||||
| 2204 | 0 | my $header_params = {}; | |||||||||
| 2205 | 0 | my $form_params = {}; | |||||||||
| 2206 | |||||||||||
| 2207 | # 'Accept' and 'Content-Type' header | ||||||||||
| 2208 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 2209 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2210 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 2211 | } | ||||||||||
| 2212 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | |||||||||
| 2213 | |||||||||||
| 2214 | # query params | ||||||||||
| 2215 | 0 | ▶ | if ( exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2216 | 0 | $_resource_path =~ s/\Q{name}\E/$args{'name'}/g; | |||||||||
| 2217 | }else{ | ||||||||||
| 2218 | 0 | $_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g; | |||||||||
| 2219 | }# query params | ||||||||||
| 2220 | 0 | ▶ | if ( exists $args{'fromScratch'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2221 | 0 | $_resource_path =~ s/\Q{fromScratch}\E/$args{'fromScratch'}/g; | |||||||||
| 2222 | }else{ | ||||||||||
| 2223 | 0 | $_resource_path =~ s/[?&]fromScratch.*?(?=&|\?|$)//g; | |||||||||
| 2224 | }# query params | ||||||||||
| 2225 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2226 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 2227 | }else{ | ||||||||||
| 2228 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 2229 | }# query params | ||||||||||
| 2230 | 0 | ▶ | if ( exists $args{'folder'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2231 | 0 | $_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g; | |||||||||
| 2232 | }else{ | ||||||||||
| 2233 | 0 | $_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g; | |||||||||
| 2234 | }# query params | ||||||||||
| 2235 | 0 | ▶ | if ( exists $args{'storage'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2236 | 0 | $_resource_path =~ s/\Q{storage}\E/$args{'storage'}/g; | |||||||||
| 2237 | }else{ | ||||||||||
| 2238 | 0 | $_resource_path =~ s/[?&]storage.*?(?=&|\?|$)//g; | |||||||||
| 2239 | } | ||||||||||
| 2240 | |||||||||||
| 2241 | |||||||||||
| 2242 | 0 | my $_body_data; | |||||||||
| 2243 | |||||||||||
| 2244 | |||||||||||
| 2245 | |||||||||||
| 2246 | |||||||||||
| 2247 | # authentication setting, if any | ||||||||||
| 2248 | 0 | my $auth_settings = []; | |||||||||
| 2249 | |||||||||||
| 2250 | # make the API Call | ||||||||||
| 2251 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 2252 | $query_params, $form_params, | ||||||||||
| 2253 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 2254 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2255 | 0 | return; | |||||||||
| 2256 | } | ||||||||||
| 2257 | |||||||||||
| 2258 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2259 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 2260 | } | ||||||||||
| 2261 | |||||||||||
| 2262 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 2263 | 0 | return $_response_object; | |||||||||
| 2264 | |||||||||||
| 2265 | } | ||||||||||
| 2266 | # | ||||||||||
| 2267 | # GetImageProperties | ||||||||||
| 2268 | # | ||||||||||
| 2269 | # Get properties of an image. | ||||||||||
| 2270 | # | ||||||||||
| 2271 | # @param String $name The image name. (required) | ||||||||||
| 2272 | # @param String $folder Folder with image to process. (optional) | ||||||||||
| 2273 | # @param String $storage (optional) | ||||||||||
| 2274 | # @return ImagingResponse | ||||||||||
| 2275 | # | ||||||||||
| 2276 | 0 | ▶ | sub GetImageProperties { | ||||||||
|
Subroutine
GetImageProperties: not called CC=8 SCAR=42.8
Pod
undocumented
| |||||||||||
| 2277 | 0 | my ($self, %args) = @_; | |||||||||
| 2278 | |||||||||||
| 2279 | |||||||||||
| 2280 | # verify the required parameter 'name' is set | ||||||||||
| 2281 | 0 | ▶ | unless (exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2282 | 0 | croak("Missing the required parameter 'name' when calling GetImageProperties"); | |||||||||
| 2283 | } | ||||||||||
| 2284 | |||||||||||
| 2285 | |||||||||||
| 2286 | # parse inputs | ||||||||||
| 2287 | 0 | my $_resource_path = '/imaging/{name}/properties/?appSid={appSid}&folder={folder}&storage={storage}'; | |||||||||
| 2288 | |||||||||||
| 2289 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 2290 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 2291 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 2292 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 2293 | |||||||||||
| 2294 | 0 | my $_method = 'GET'; | |||||||||
| 2295 | 0 | my $query_params = {}; | |||||||||
| 2296 | 0 | my $header_params = {}; | |||||||||
| 2297 | 0 | my $form_params = {}; | |||||||||
| 2298 | |||||||||||
| 2299 | # 'Accept' and 'Content-Type' header | ||||||||||
| 2300 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/json'); | |||||||||
| 2301 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2302 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 2303 | } | ||||||||||
| 2304 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | |||||||||
| 2305 | |||||||||||
| 2306 | # query params | ||||||||||
| 2307 | 0 | ▶ | if ( exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2308 | 0 | $_resource_path =~ s/\Q{name}\E/$args{'name'}/g; | |||||||||
| 2309 | }else{ | ||||||||||
| 2310 | 0 | $_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g; | |||||||||
| 2311 | }# query params | ||||||||||
| 2312 | 0 | ▶ | if ( exists $args{'folder'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2313 | 0 | $_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g; | |||||||||
| 2314 | }else{ | ||||||||||
| 2315 | 0 | $_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g; | |||||||||
| 2316 | }# query params | ||||||||||
| 2317 | 0 | ▶ | if ( exists $args{'storage'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2318 | 0 | $_resource_path =~ s/\Q{storage}\E/$args{'storage'}/g; | |||||||||
| 2319 | }else{ | ||||||||||
| 2320 | 0 | $_resource_path =~ s/[?&]storage.*?(?=&|\?|$)//g; | |||||||||
| 2321 | } | ||||||||||
| 2322 | |||||||||||
| 2323 | |||||||||||
| 2324 | 0 | my $_body_data; | |||||||||
| 2325 | |||||||||||
| 2326 | |||||||||||
| 2327 | |||||||||||
| 2328 | |||||||||||
| 2329 | # authentication setting, if any | ||||||||||
| 2330 | 0 | my $auth_settings = []; | |||||||||
| 2331 | |||||||||||
| 2332 | # make the API Call | ||||||||||
| 2333 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 2334 | $query_params, $form_params, | ||||||||||
| 2335 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 2336 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2337 | 0 | return; | |||||||||
| 2338 | } | ||||||||||
| 2339 | |||||||||||
| 2340 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2341 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 2342 | } | ||||||||||
| 2343 | |||||||||||
| 2344 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ImagingResponse', $response->header('content-type')); | |||||||||
| 2345 | 0 | return $_response_object; | |||||||||
| 2346 | |||||||||||
| 2347 | } | ||||||||||
| 2348 | # | ||||||||||
| 2349 | # GetImagePsd | ||||||||||
| 2350 | # | ||||||||||
| 2351 | # Update parameters of psd image. | ||||||||||
| 2352 | # | ||||||||||
| 2353 | # @param String $name Filename of image. (required) | ||||||||||
| 2354 | # @param Integer $channelsCount Count of channels. (optional) | ||||||||||
| 2355 | # @param String $compressionMethod Compression method. (optional) | ||||||||||
| 2356 | # @param Boolean $fromScratch 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. (optional) | ||||||||||
| 2357 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 2358 | # @param String $folder Folder with image to process. (optional) | ||||||||||
| 2359 | # @param String $storage (optional) | ||||||||||
| 2360 | # @return ResponseMessage | ||||||||||
| 2361 | # | ||||||||||
| 2362 | 0 | ▶ | sub GetImagePsd { | ||||||||
|
Subroutine
GetImagePsd: not called CC=12 SCAR=50.5
Pod
undocumented
| |||||||||||
| 2363 | 0 | my ($self, %args) = @_; | |||||||||
| 2364 | |||||||||||
| 2365 | |||||||||||
| 2366 | # verify the required parameter 'name' is set | ||||||||||
| 2367 | 0 | ▶ | unless (exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2368 | 0 | croak("Missing the required parameter 'name' when calling GetImagePsd"); | |||||||||
| 2369 | } | ||||||||||
| 2370 | |||||||||||
| 2371 | |||||||||||
| 2372 | # parse inputs | ||||||||||
| 2373 | 0 | my $_resource_path = '/imaging/{name}/psd/?appSid={appSid}&channelsCount={channelsCount}&compressionMethod={compressionMethod}&fromScratch={fromScratch}&outPath={outPath}&folder={folder}&storage={storage}'; | |||||||||
| 2374 | |||||||||||
| 2375 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 2376 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 2377 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 2378 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 2379 | |||||||||||
| 2380 | 0 | my $_method = 'GET'; | |||||||||
| 2381 | 0 | my $query_params = {}; | |||||||||
| 2382 | 0 | my $header_params = {}; | |||||||||
| 2383 | 0 | my $form_params = {}; | |||||||||
| 2384 | |||||||||||
| 2385 | # 'Accept' and 'Content-Type' header | ||||||||||
| 2386 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 2387 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2388 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 2389 | } | ||||||||||
| 2390 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | |||||||||
| 2391 | |||||||||||
| 2392 | # query params | ||||||||||
| 2393 | 0 | ▶ | if ( exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2394 | 0 | $_resource_path =~ s/\Q{name}\E/$args{'name'}/g; | |||||||||
| 2395 | }else{ | ||||||||||
| 2396 | 0 | $_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g; | |||||||||
| 2397 | }# query params | ||||||||||
| 2398 | 0 | ▶ | if ( exists $args{'channelsCount'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2399 | 0 | $_resource_path =~ s/\Q{channelsCount}\E/$args{'channelsCount'}/g; | |||||||||
| 2400 | }else{ | ||||||||||
| 2401 | 0 | $_resource_path =~ s/[?&]channelsCount.*?(?=&|\?|$)//g; | |||||||||
| 2402 | }# query params | ||||||||||
| 2403 | 0 | ▶ | if ( exists $args{'compressionMethod'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2404 | 0 | $_resource_path =~ s/\Q{compressionMethod}\E/$args{'compressionMethod'}/g; | |||||||||
| 2405 | }else{ | ||||||||||
| 2406 | 0 | $_resource_path =~ s/[?&]compressionMethod.*?(?=&|\?|$)//g; | |||||||||
| 2407 | }# query params | ||||||||||
| 2408 | 0 | ▶ | if ( exists $args{'fromScratch'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2409 | 0 | $_resource_path =~ s/\Q{fromScratch}\E/$args{'fromScratch'}/g; | |||||||||
| 2410 | }else{ | ||||||||||
| 2411 | 0 | $_resource_path =~ s/[?&]fromScratch.*?(?=&|\?|$)//g; | |||||||||
| 2412 | }# query params | ||||||||||
| 2413 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2414 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 2415 | }else{ | ||||||||||
| 2416 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 2417 | }# query params | ||||||||||
| 2418 | 0 | ▶ | if ( exists $args{'folder'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2419 | 0 | $_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g; | |||||||||
| 2420 | }else{ | ||||||||||
| 2421 | 0 | $_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g; | |||||||||
| 2422 | }# query params | ||||||||||
| 2423 | 0 | ▶ | if ( exists $args{'storage'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2424 | 0 | $_resource_path =~ s/\Q{storage}\E/$args{'storage'}/g; | |||||||||
| 2425 | }else{ | ||||||||||
| 2426 | 0 | $_resource_path =~ s/[?&]storage.*?(?=&|\?|$)//g; | |||||||||
| 2427 | } | ||||||||||
| 2428 | |||||||||||
| 2429 | |||||||||||
| 2430 | 0 | my $_body_data; | |||||||||
| 2431 | |||||||||||
| 2432 | |||||||||||
| 2433 | |||||||||||
| 2434 | |||||||||||
| 2435 | # authentication setting, if any | ||||||||||
| 2436 | 0 | my $auth_settings = []; | |||||||||
| 2437 | |||||||||||
| 2438 | # make the API Call | ||||||||||
| 2439 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 2440 | $query_params, $form_params, | ||||||||||
| 2441 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 2442 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2443 | 0 | return; | |||||||||
| 2444 | } | ||||||||||
| 2445 | |||||||||||
| 2446 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2447 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 2448 | } | ||||||||||
| 2449 | |||||||||||
| 2450 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 2451 | 0 | return $_response_object; | |||||||||
| 2452 | |||||||||||
| 2453 | } | ||||||||||
| 2454 | # | ||||||||||
| 2455 | # GetChangeImageScale | ||||||||||
| 2456 | # | ||||||||||
| 2457 | # Change scale of an existing image | ||||||||||
| 2458 | # | ||||||||||
| 2459 | # @param String $name The image name. (required) | ||||||||||
| 2460 | # @param String $format Output file format. Valid Formats: Bmp, png, jpg, tiff, psd, gif. (required) | ||||||||||
| 2461 | # @param String $newWidth New width of the scaled image. (required) | ||||||||||
| 2462 | # @param String $newHeight New height of the scaled image. (required) | ||||||||||
| 2463 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 2464 | # @param String $folder Folder with image to process. (optional) | ||||||||||
| 2465 | # @param String $storage (optional) | ||||||||||
| 2466 | # @return ResponseMessage | ||||||||||
| 2467 | # | ||||||||||
| 2468 | 0 | ▶ | sub GetChangeImageScale { | ||||||||
|
Subroutine
GetChangeImageScale: not called CC=15 SCAR=54.8
Pod
undocumented
| |||||||||||
| 2469 | 0 | my ($self, %args) = @_; | |||||||||
| 2470 | |||||||||||
| 2471 | |||||||||||
| 2472 | # verify the required parameter 'name' is set | ||||||||||
| 2473 | 0 | ▶ | unless (exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2474 | 0 | croak("Missing the required parameter 'name' when calling GetChangeImageScale"); | |||||||||
| 2475 | } | ||||||||||
| 2476 | |||||||||||
| 2477 | # verify the required parameter 'format' is set | ||||||||||
| 2478 | 0 | ▶ | unless (exists $args{'format'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2479 | 0 | croak("Missing the required parameter 'format' when calling GetChangeImageScale"); | |||||||||
| 2480 | } | ||||||||||
| 2481 | |||||||||||
| 2482 | # verify the required parameter 'newWidth' is set | ||||||||||
| 2483 | 0 | ▶ | unless (exists $args{'newWidth'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2484 | 0 | croak("Missing the required parameter 'newWidth' when calling GetChangeImageScale"); | |||||||||
| 2485 | } | ||||||||||
| 2486 | |||||||||||
| 2487 | # verify the required parameter 'newHeight' is set | ||||||||||
| 2488 | 0 | ▶ | unless (exists $args{'newHeight'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2489 | 0 | croak("Missing the required parameter 'newHeight' when calling GetChangeImageScale"); | |||||||||
| 2490 | } | ||||||||||
| 2491 | |||||||||||
| 2492 | |||||||||||
| 2493 | # parse inputs | ||||||||||
| 2494 | 0 | my $_resource_path = '/imaging/{name}/resize/?appSid={appSid}&toFormat={toFormat}&newWidth={newWidth}&newHeight={newHeight}&outPath={outPath}&folder={folder}&storage={storage}'; | |||||||||
| 2495 | |||||||||||
| 2496 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 2497 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 2498 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 2499 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 2500 | |||||||||||
| 2501 | 0 | my $_method = 'GET'; | |||||||||
| 2502 | 0 | my $query_params = {}; | |||||||||
| 2503 | 0 | my $header_params = {}; | |||||||||
| 2504 | 0 | my $form_params = {}; | |||||||||
| 2505 | |||||||||||
| 2506 | # 'Accept' and 'Content-Type' header | ||||||||||
| 2507 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 2508 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2509 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 2510 | } | ||||||||||
| 2511 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | |||||||||
| 2512 | |||||||||||
| 2513 | # query params | ||||||||||
| 2514 | 0 | ▶ | if ( exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2515 | 0 | $_resource_path =~ s/\Q{name}\E/$args{'name'}/g; | |||||||||
| 2516 | }else{ | ||||||||||
| 2517 | 0 | $_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g; | |||||||||
| 2518 | }# query params | ||||||||||
| 2519 | 0 | ▶ | if ( exists $args{'format'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2520 | 0 | $_resource_path =~ s/\Q{format}\E/$args{'format'}/g; | |||||||||
| 2521 | }else{ | ||||||||||
| 2522 | 0 | $_resource_path =~ s/[?&]format.*?(?=&|\?|$)//g; | |||||||||
| 2523 | }# query params | ||||||||||
| 2524 | 0 | ▶ | if ( exists $args{'newWidth'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2525 | 0 | $_resource_path =~ s/\Q{newWidth}\E/$args{'newWidth'}/g; | |||||||||
| 2526 | }else{ | ||||||||||
| 2527 | 0 | $_resource_path =~ s/[?&]newWidth.*?(?=&|\?|$)//g; | |||||||||
| 2528 | }# query params | ||||||||||
| 2529 | 0 | ▶ | if ( exists $args{'newHeight'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2530 | 0 | $_resource_path =~ s/\Q{newHeight}\E/$args{'newHeight'}/g; | |||||||||
| 2531 | }else{ | ||||||||||
| 2532 | 0 | $_resource_path =~ s/[?&]newHeight.*?(?=&|\?|$)//g; | |||||||||
| 2533 | }# query params | ||||||||||
| 2534 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2535 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 2536 | }else{ | ||||||||||
| 2537 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 2538 | }# query params | ||||||||||
| 2539 | 0 | ▶ | if ( exists $args{'folder'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2540 | 0 | $_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g; | |||||||||
| 2541 | }else{ | ||||||||||
| 2542 | 0 | $_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g; | |||||||||
| 2543 | }# query params | ||||||||||
| 2544 | 0 | ▶ | if ( exists $args{'storage'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2545 | 0 | $_resource_path =~ s/\Q{storage}\E/$args{'storage'}/g; | |||||||||
| 2546 | }else{ | ||||||||||
| 2547 | 0 | $_resource_path =~ s/[?&]storage.*?(?=&|\?|$)//g; | |||||||||
| 2548 | } | ||||||||||
| 2549 | |||||||||||
| 2550 | |||||||||||
| 2551 | 0 | my $_body_data; | |||||||||
| 2552 | |||||||||||
| 2553 | |||||||||||
| 2554 | |||||||||||
| 2555 | |||||||||||
| 2556 | # authentication setting, if any | ||||||||||
| 2557 | 0 | my $auth_settings = []; | |||||||||
| 2558 | |||||||||||
| 2559 | # make the API Call | ||||||||||
| 2560 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 2561 | $query_params, $form_params, | ||||||||||
| 2562 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 2563 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2564 | 0 | return; | |||||||||
| 2565 | } | ||||||||||
| 2566 | |||||||||||
| 2567 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2568 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 2569 | } | ||||||||||
| 2570 | |||||||||||
| 2571 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 2572 | 0 | return $_response_object; | |||||||||
| 2573 | |||||||||||
| 2574 | } | ||||||||||
| 2575 | # | ||||||||||
| 2576 | # GetImageRotateFlip | ||||||||||
| 2577 | # | ||||||||||
| 2578 | # Rotate and flip existing image | ||||||||||
| 2579 | # | ||||||||||
| 2580 | # @param String $name Filename of image. (required) | ||||||||||
| 2581 | # @param String $format Number of frame. (Bmp, png, jpg, tiff, psd, gif.) (required) | ||||||||||
| 2582 | # @param String $method New width of the scaled image. (Rotate180FlipNone, Rotate180FlipX, Rotate180FlipXY, Rotate180FlipY, Rotate270FlipNone, Rotate270FlipX, Rotate270FlipXY, Rotate270FlipY, Rotate90FlipNone, Rotate90FlipX, Rotate90FlipXY, Rotate90FlipY, RotateNoneFlipNone, RotateNoneFlipX, RotateNoneFlipXY, RotateNoneFlipY) (required) | ||||||||||
| 2583 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 2584 | # @param String $folder Folder with image to process. (optional) | ||||||||||
| 2585 | # @param String $storage (optional) | ||||||||||
| 2586 | # @return ResponseMessage | ||||||||||
| 2587 | # | ||||||||||
| 2588 | 0 | ▶ | sub GetImageRotateFlip { | ||||||||
|
Subroutine
GetImageRotateFlip: not called CC=13 SCAR=52.0
Pod
undocumented
| |||||||||||
| 2589 | 0 | my ($self, %args) = @_; | |||||||||
| 2590 | |||||||||||
| 2591 | |||||||||||
| 2592 | # verify the required parameter 'name' is set | ||||||||||
| 2593 | 0 | ▶ | unless (exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2594 | 0 | croak("Missing the required parameter 'name' when calling GetImageRotateFlip"); | |||||||||
| 2595 | } | ||||||||||
| 2596 | |||||||||||
| 2597 | # verify the required parameter 'format' is set | ||||||||||
| 2598 | 0 | ▶ | unless (exists $args{'format'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2599 | 0 | croak("Missing the required parameter 'format' when calling GetImageRotateFlip"); | |||||||||
| 2600 | } | ||||||||||
| 2601 | |||||||||||
| 2602 | # verify the required parameter 'method' is set | ||||||||||
| 2603 | 0 | ▶ | unless (exists $args{'method'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2604 | 0 | croak("Missing the required parameter 'method' when calling GetImageRotateFlip"); | |||||||||
| 2605 | } | ||||||||||
| 2606 | |||||||||||
| 2607 | |||||||||||
| 2608 | # parse inputs | ||||||||||
| 2609 | 0 | my $_resource_path = '/imaging/{name}/rotateflip/?toFormat={toFormat}&appSid={appSid}&method={method}&outPath={outPath}&folder={folder}&storage={storage}'; | |||||||||
| 2610 | |||||||||||
| 2611 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 2612 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 2613 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 2614 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 2615 | |||||||||||
| 2616 | 0 | my $_method = 'GET'; | |||||||||
| 2617 | 0 | my $query_params = {}; | |||||||||
| 2618 | 0 | my $header_params = {}; | |||||||||
| 2619 | 0 | my $form_params = {}; | |||||||||
| 2620 | |||||||||||
| 2621 | # 'Accept' and 'Content-Type' header | ||||||||||
| 2622 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 2623 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2624 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 2625 | } | ||||||||||
| 2626 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | |||||||||
| 2627 | |||||||||||
| 2628 | # query params | ||||||||||
| 2629 | 0 | ▶ | if ( exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2630 | 0 | $_resource_path =~ s/\Q{name}\E/$args{'name'}/g; | |||||||||
| 2631 | }else{ | ||||||||||
| 2632 | 0 | $_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g; | |||||||||
| 2633 | }# query params | ||||||||||
| 2634 | 0 | ▶ | if ( exists $args{'format'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2635 | 0 | $_resource_path =~ s/\Q{format}\E/$args{'format'}/g; | |||||||||
| 2636 | }else{ | ||||||||||
| 2637 | 0 | $_resource_path =~ s/[?&]format.*?(?=&|\?|$)//g; | |||||||||
| 2638 | }# query params | ||||||||||
| 2639 | 0 | ▶ | if ( exists $args{'method'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2640 | 0 | $_resource_path =~ s/\Q{method}\E/$args{'method'}/g; | |||||||||
| 2641 | }else{ | ||||||||||
| 2642 | 0 | $_resource_path =~ s/[?&]method.*?(?=&|\?|$)//g; | |||||||||
| 2643 | }# query params | ||||||||||
| 2644 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2645 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 2646 | }else{ | ||||||||||
| 2647 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 2648 | }# query params | ||||||||||
| 2649 | 0 | ▶ | if ( exists $args{'folder'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2650 | 0 | $_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g; | |||||||||
| 2651 | }else{ | ||||||||||
| 2652 | 0 | $_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g; | |||||||||
| 2653 | }# query params | ||||||||||
| 2654 | 0 | ▶ | if ( exists $args{'storage'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2655 | 0 | $_resource_path =~ s/\Q{storage}\E/$args{'storage'}/g; | |||||||||
| 2656 | }else{ | ||||||||||
| 2657 | 0 | $_resource_path =~ s/[?&]storage.*?(?=&|\?|$)//g; | |||||||||
| 2658 | } | ||||||||||
| 2659 | |||||||||||
| 2660 | |||||||||||
| 2661 | 0 | my $_body_data; | |||||||||
| 2662 | |||||||||||
| 2663 | |||||||||||
| 2664 | |||||||||||
| 2665 | |||||||||||
| 2666 | # authentication setting, if any | ||||||||||
| 2667 | 0 | my $auth_settings = []; | |||||||||
| 2668 | |||||||||||
| 2669 | # make the API Call | ||||||||||
| 2670 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 2671 | $query_params, $form_params, | ||||||||||
| 2672 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 2673 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2674 | 0 | return; | |||||||||
| 2675 | } | ||||||||||
| 2676 | |||||||||||
| 2677 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2678 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 2679 | } | ||||||||||
| 2680 | |||||||||||
| 2681 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 2682 | 0 | return $_response_object; | |||||||||
| 2683 | |||||||||||
| 2684 | } | ||||||||||
| 2685 | # | ||||||||||
| 2686 | # GetImageSaveAs | ||||||||||
| 2687 | # | ||||||||||
| 2688 | # Export existing image to another format | ||||||||||
| 2689 | # | ||||||||||
| 2690 | # @param String $name Filename of image. (required) | ||||||||||
| 2691 | # @param String $format Output file format. (Bmp, png, jpg, tiff, psd, gif.) (required) | ||||||||||
| 2692 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 2693 | # @param String $folder Folder with image to process. (optional) | ||||||||||
| 2694 | # @param String $storage (optional) | ||||||||||
| 2695 | # @return ResponseMessage | ||||||||||
| 2696 | # | ||||||||||
| 2697 | 0 | ▶ | sub GetImageSaveAs { | ||||||||
|
Subroutine
GetImageSaveAs: not called CC=11 SCAR=48.8
Pod
undocumented
| |||||||||||
| 2698 | 0 | my ($self, %args) = @_; | |||||||||
| 2699 | |||||||||||
| 2700 | |||||||||||
| 2701 | # verify the required parameter 'name' is set | ||||||||||
| 2702 | 0 | ▶ | unless (exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2703 | 0 | croak("Missing the required parameter 'name' when calling GetImageSaveAs"); | |||||||||
| 2704 | } | ||||||||||
| 2705 | |||||||||||
| 2706 | # verify the required parameter 'format' is set | ||||||||||
| 2707 | 0 | ▶ | unless (exists $args{'format'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2708 | 0 | croak("Missing the required parameter 'format' when calling GetImageSaveAs"); | |||||||||
| 2709 | } | ||||||||||
| 2710 | |||||||||||
| 2711 | |||||||||||
| 2712 | # parse inputs | ||||||||||
| 2713 | 0 | my $_resource_path = '/imaging/{name}/saveAs/?appSid={appSid}&toFormat={toFormat}&outPath={outPath}&folder={folder}&storage={storage}'; | |||||||||
| 2714 | |||||||||||
| 2715 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 2716 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 2717 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 2718 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 2719 | |||||||||||
| 2720 | 0 | my $_method = 'GET'; | |||||||||
| 2721 | 0 | my $query_params = {}; | |||||||||
| 2722 | 0 | my $header_params = {}; | |||||||||
| 2723 | 0 | my $form_params = {}; | |||||||||
| 2724 | |||||||||||
| 2725 | # 'Accept' and 'Content-Type' header | ||||||||||
| 2726 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 2727 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2728 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 2729 | } | ||||||||||
| 2730 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | |||||||||
| 2731 | |||||||||||
| 2732 | # query params | ||||||||||
| 2733 | 0 | ▶ | if ( exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2734 | 0 | $_resource_path =~ s/\Q{name}\E/$args{'name'}/g; | |||||||||
| 2735 | }else{ | ||||||||||
| 2736 | 0 | $_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g; | |||||||||
| 2737 | }# query params | ||||||||||
| 2738 | 0 | ▶ | if ( exists $args{'format'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2739 | 0 | $_resource_path =~ s/\Q{format}\E/$args{'format'}/g; | |||||||||
| 2740 | }else{ | ||||||||||
| 2741 | 0 | $_resource_path =~ s/[?&]format.*?(?=&|\?|$)//g; | |||||||||
| 2742 | }# query params | ||||||||||
| 2743 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2744 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 2745 | }else{ | ||||||||||
| 2746 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 2747 | }# query params | ||||||||||
| 2748 | 0 | ▶ | if ( exists $args{'folder'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2749 | 0 | $_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g; | |||||||||
| 2750 | }else{ | ||||||||||
| 2751 | 0 | $_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g; | |||||||||
| 2752 | }# query params | ||||||||||
| 2753 | 0 | ▶ | if ( exists $args{'storage'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2754 | 0 | $_resource_path =~ s/\Q{storage}\E/$args{'storage'}/g; | |||||||||
| 2755 | }else{ | ||||||||||
| 2756 | 0 | $_resource_path =~ s/[?&]storage.*?(?=&|\?|$)//g; | |||||||||
| 2757 | } | ||||||||||
| 2758 | |||||||||||
| 2759 | |||||||||||
| 2760 | 0 | my $_body_data; | |||||||||
| 2761 | |||||||||||
| 2762 | |||||||||||
| 2763 | |||||||||||
| 2764 | |||||||||||
| 2765 | # authentication setting, if any | ||||||||||
| 2766 | 0 | my $auth_settings = []; | |||||||||
| 2767 | |||||||||||
| 2768 | # make the API Call | ||||||||||
| 2769 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 2770 | $query_params, $form_params, | ||||||||||
| 2771 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 2772 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2773 | 0 | return; | |||||||||
| 2774 | } | ||||||||||
| 2775 | |||||||||||
| 2776 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2777 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 2778 | } | ||||||||||
| 2779 | |||||||||||
| 2780 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 2781 | 0 | return $_response_object; | |||||||||
| 2782 | |||||||||||
| 2783 | } | ||||||||||
| 2784 | # | ||||||||||
| 2785 | # GetUpdatedImage | ||||||||||
| 2786 | # | ||||||||||
| 2787 | # Perform scaling, cropping and flipping of an image in single request. | ||||||||||
| 2788 | # | ||||||||||
| 2789 | # @param String $name Filename of image. (required) | ||||||||||
| 2790 | # @param String $format Save image in another format. By default format remains the same (required) | ||||||||||
| 2791 | # @param String $newWidth New Width of the scaled image. (required) | ||||||||||
| 2792 | # @param String $newHeight New height of the scaled image. (required) | ||||||||||
| 2793 | # @param String $x X position of start point for cropping rectangle (required) | ||||||||||
| 2794 | # @param String $y Y position of start point for cropping rectangle (required) | ||||||||||
| 2795 | # @param String $rectWidth Width of cropping rectangle (required) | ||||||||||
| 2796 | # @param String $rectHeight Height of cropping rectangle (required) | ||||||||||
| 2797 | # @param String $rotateFlipMethod RotateFlip method. Default is RotateNoneFlipNone. (required) | ||||||||||
| 2798 | # @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional) | ||||||||||
| 2799 | # @param String $folder Folder with image to process. (optional) | ||||||||||
| 2800 | # @param String $storage (optional) | ||||||||||
| 2801 | # @return ResponseMessage | ||||||||||
| 2802 | # | ||||||||||
| 2803 | 0 | ▶ | sub GetUpdatedImage { | ||||||||
|
Subroutine
GetUpdatedImage: not called CC=25 SCAR=64.8
Pod
undocumented
| |||||||||||
| 2804 | 0 | my ($self, %args) = @_; | |||||||||
| 2805 | |||||||||||
| 2806 | |||||||||||
| 2807 | # verify the required parameter 'name' is set | ||||||||||
| 2808 | 0 | ▶ | unless (exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2809 | 0 | croak("Missing the required parameter 'name' when calling GetUpdatedImage"); | |||||||||
| 2810 | } | ||||||||||
| 2811 | |||||||||||
| 2812 | # verify the required parameter 'format' is set | ||||||||||
| 2813 | 0 | ▶ | unless (exists $args{'format'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2814 | 0 | croak("Missing the required parameter 'format' when calling GetUpdatedImage"); | |||||||||
| 2815 | } | ||||||||||
| 2816 | |||||||||||
| 2817 | # verify the required parameter 'newWidth' is set | ||||||||||
| 2818 | 0 | ▶ | unless (exists $args{'newWidth'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2819 | 0 | croak("Missing the required parameter 'newWidth' when calling GetUpdatedImage"); | |||||||||
| 2820 | } | ||||||||||
| 2821 | |||||||||||
| 2822 | # verify the required parameter 'newHeight' is set | ||||||||||
| 2823 | 0 | ▶ | unless (exists $args{'newHeight'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2824 | 0 | croak("Missing the required parameter 'newHeight' when calling GetUpdatedImage"); | |||||||||
| 2825 | } | ||||||||||
| 2826 | |||||||||||
| 2827 | # verify the required parameter 'x' is set | ||||||||||
| 2828 | 0 | ▶ | unless (exists $args{'x'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2829 | 0 | croak("Missing the required parameter 'x' when calling GetUpdatedImage"); | |||||||||
| 2830 | } | ||||||||||
| 2831 | |||||||||||
| 2832 | # verify the required parameter 'y' is set | ||||||||||
| 2833 | 0 | ▶ | unless (exists $args{'y'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2834 | 0 | croak("Missing the required parameter 'y' when calling GetUpdatedImage"); | |||||||||
| 2835 | } | ||||||||||
| 2836 | |||||||||||
| 2837 | # verify the required parameter 'rectWidth' is set | ||||||||||
| 2838 | 0 | ▶ | unless (exists $args{'rectWidth'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2839 | 0 | croak("Missing the required parameter 'rectWidth' when calling GetUpdatedImage"); | |||||||||
| 2840 | } | ||||||||||
| 2841 | |||||||||||
| 2842 | # verify the required parameter 'rectHeight' is set | ||||||||||
| 2843 | 0 | ▶ | unless (exists $args{'rectHeight'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2844 | 0 | croak("Missing the required parameter 'rectHeight' when calling GetUpdatedImage"); | |||||||||
| 2845 | } | ||||||||||
| 2846 | |||||||||||
| 2847 | # verify the required parameter 'rotateFlipMethod' is set | ||||||||||
| 2848 | 0 | ▶ | unless (exists $args{'rotateFlipMethod'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2849 | 0 | croak("Missing the required parameter 'rotateFlipMethod' when calling GetUpdatedImage"); | |||||||||
| 2850 | } | ||||||||||
| 2851 | |||||||||||
| 2852 | |||||||||||
| 2853 | # parse inputs | ||||||||||
| 2854 | 0 | my $_resource_path = '/imaging/{name}/updateImage/?appSid={appSid}&toFormat={toFormat}&newWidth={newWidth}&newHeight={newHeight}&x={x}&y={y}&rectWidth={rectWidth}&rectHeight={rectHeight}&rotateFlipMethod={rotateFlipMethod}&outPath={outPath}&folder={folder}&storage={storage}'; | |||||||||
| 2855 | |||||||||||
| 2856 | 0 | $_resource_path =~ s/\Q&\E/&/g; | |||||||||
| 2857 | 0 | $_resource_path =~ s/\Q\/?\E/?/g; | |||||||||
| 2858 | 0 | $_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g; | |||||||||
| 2859 | 0 | $_resource_path =~ s/\Q{path}\E/{Path}/g; | |||||||||
| 2860 | |||||||||||
| 2861 | 0 | my $_method = 'GET'; | |||||||||
| 2862 | 0 | my $query_params = {}; | |||||||||
| 2863 | 0 | my $header_params = {}; | |||||||||
| 2864 | 0 | my $form_params = {}; | |||||||||
| 2865 | |||||||||||
| 2866 | # 'Accept' and 'Content-Type' header | ||||||||||
| 2867 | 0 | my $_header_accept = $self->{api_client}->select_header_accept('application/xml', 'application/octet-stream'); | |||||||||
| 2868 | 0 | ▶ | if ($_header_accept) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2869 | 0 | $header_params->{'Accept'} = $_header_accept; | |||||||||
| 2870 | } | ||||||||||
| 2871 | 0 | $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); | |||||||||
| 2872 | |||||||||||
| 2873 | # query params | ||||||||||
| 2874 | 0 | ▶ | if ( exists $args{'name'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2875 | 0 | $_resource_path =~ s/\Q{name}\E/$args{'name'}/g; | |||||||||
| 2876 | }else{ | ||||||||||
| 2877 | 0 | $_resource_path =~ s/[?&]name.*?(?=&|\?|$)//g; | |||||||||
| 2878 | }# query params | ||||||||||
| 2879 | 0 | ▶ | if ( exists $args{'format'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2880 | 0 | $_resource_path =~ s/\Q{format}\E/$args{'format'}/g; | |||||||||
| 2881 | }else{ | ||||||||||
| 2882 | 0 | $_resource_path =~ s/[?&]format.*?(?=&|\?|$)//g; | |||||||||
| 2883 | }# query params | ||||||||||
| 2884 | 0 | ▶ | if ( exists $args{'newWidth'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2885 | 0 | $_resource_path =~ s/\Q{newWidth}\E/$args{'newWidth'}/g; | |||||||||
| 2886 | }else{ | ||||||||||
| 2887 | 0 | $_resource_path =~ s/[?&]newWidth.*?(?=&|\?|$)//g; | |||||||||
| 2888 | }# query params | ||||||||||
| 2889 | 0 | ▶ | if ( exists $args{'newHeight'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2890 | 0 | $_resource_path =~ s/\Q{newHeight}\E/$args{'newHeight'}/g; | |||||||||
| 2891 | }else{ | ||||||||||
| 2892 | 0 | $_resource_path =~ s/[?&]newHeight.*?(?=&|\?|$)//g; | |||||||||
| 2893 | }# query params | ||||||||||
| 2894 | 0 | ▶ | if ( exists $args{'x'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2895 | 0 | $_resource_path =~ s/\Q{x}\E/$args{'x'}/g; | |||||||||
| 2896 | }else{ | ||||||||||
| 2897 | 0 | $_resource_path =~ s/[?&]x.*?(?=&|\?|$)//g; | |||||||||
| 2898 | }# query params | ||||||||||
| 2899 | 0 | ▶ | if ( exists $args{'y'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2900 | 0 | $_resource_path =~ s/\Q{y}\E/$args{'y'}/g; | |||||||||
| 2901 | }else{ | ||||||||||
| 2902 | 0 | $_resource_path =~ s/[?&]y.*?(?=&|\?|$)//g; | |||||||||
| 2903 | }# query params | ||||||||||
| 2904 | 0 | ▶ | if ( exists $args{'rectWidth'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2905 | 0 | $_resource_path =~ s/\Q{rectWidth}\E/$args{'rectWidth'}/g; | |||||||||
| 2906 | }else{ | ||||||||||
| 2907 | 0 | $_resource_path =~ s/[?&]rectWidth.*?(?=&|\?|$)//g; | |||||||||
| 2908 | }# query params | ||||||||||
| 2909 | 0 | ▶ | if ( exists $args{'rectHeight'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2910 | 0 | $_resource_path =~ s/\Q{rectHeight}\E/$args{'rectHeight'}/g; | |||||||||
| 2911 | }else{ | ||||||||||
| 2912 | 0 | $_resource_path =~ s/[?&]rectHeight.*?(?=&|\?|$)//g; | |||||||||
| 2913 | }# query params | ||||||||||
| 2914 | 0 | ▶ | if ( exists $args{'rotateFlipMethod'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2915 | 0 | $_resource_path =~ s/\Q{rotateFlipMethod}\E/$args{'rotateFlipMethod'}/g; | |||||||||
| 2916 | }else{ | ||||||||||
| 2917 | 0 | $_resource_path =~ s/[?&]rotateFlipMethod.*?(?=&|\?|$)//g; | |||||||||
| 2918 | }# query params | ||||||||||
| 2919 | 0 | ▶ | if ( exists $args{'outPath'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2920 | 0 | $_resource_path =~ s/\Q{outPath}\E/$args{'outPath'}/g; | |||||||||
| 2921 | }else{ | ||||||||||
| 2922 | 0 | $_resource_path =~ s/[?&]outPath.*?(?=&|\?|$)//g; | |||||||||
| 2923 | }# query params | ||||||||||
| 2924 | 0 | ▶ | if ( exists $args{'folder'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2925 | 0 | $_resource_path =~ s/\Q{folder}\E/$args{'folder'}/g; | |||||||||
| 2926 | }else{ | ||||||||||
| 2927 | 0 | $_resource_path =~ s/[?&]folder.*?(?=&|\?|$)//g; | |||||||||
| 2928 | }# query params | ||||||||||
| 2929 | 0 | ▶ | if ( exists $args{'storage'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2930 | 0 | $_resource_path =~ s/\Q{storage}\E/$args{'storage'}/g; | |||||||||
| 2931 | }else{ | ||||||||||
| 2932 | 0 | $_resource_path =~ s/[?&]storage.*?(?=&|\?|$)//g; | |||||||||
| 2933 | } | ||||||||||
| 2934 | |||||||||||
| 2935 | |||||||||||
| 2936 | 0 | my $_body_data; | |||||||||
| 2937 | |||||||||||
| 2938 | |||||||||||
| 2939 | |||||||||||
| 2940 | |||||||||||
| 2941 | # authentication setting, if any | ||||||||||
| 2942 | 0 | my $auth_settings = []; | |||||||||
| 2943 | |||||||||||
| 2944 | # make the API Call | ||||||||||
| 2945 | 0 | my $response = $self->{api_client}->call_api($_resource_path, $_method, | |||||||||
| 2946 | $query_params, $form_params, | ||||||||||
| 2947 | $header_params, $_body_data, $auth_settings); | ||||||||||
| 2948 | 0 | ▶ | if (!$response) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2949 | 0 | return; | |||||||||
| 2950 | } | ||||||||||
| 2951 | |||||||||||
| 2952 | 0 | ▶ | if($AsposeImagingCloud::Configuration::debug){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 2953 | 0 | print "\nResponse Content: ".$response->content; | |||||||||
| 2954 | } | ||||||||||
| 2955 | |||||||||||
| 2956 | 0 | my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type')); | |||||||||
| 2957 | 0 | return $_response_object; | |||||||||
| 2958 | |||||||||||
| 2959 | } | ||||||||||
| 2960 | |||||||||||
| 2961 | |||||||||||
| 2962 | 1 | 1; | |||||||||