view release on metacpan or search on metacpan
lib/AsposeImagingCloud/Object/SectionStart.pm
lib/AsposeImagingCloud/Object/StyleIdentifier.pm
lib/AsposeImagingCloud/Object/TextEffect.pm
lib/AsposeImagingCloud/Object/TiffProperties.pm
lib/AsposeImagingCloud/Object/Underline.pm
Makefile.PL
MANIFEST
README
t/01_imaging_api.t
t/data/aspose.jpg
t/data/aspose_imaging_for_cloud.png
t/data/demo.tif
t/data/sample-multi.tif
t/data/sample.bmp
t/data/sample.gif
t/data/sample.psd
t/data/sample.tif
t/data/test.bmp
t/data/TestDemo.tif
META.yml
META.json
lib/AsposeImagingCloud/ImagingApi.pm view on Meta::CPAN
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type'));
return $_response_object;
}
#
# PostCropImage
#
# Crop image from body
#
# @param String $format Output file format. Valid Formats: Bmp, png, jpg, tiff, psd, gif. (required)
# @param String $x X position of start point for cropping rectangle (required)
# @param String $y Y position of start point for cropping rectangle (required)
# @param String $width Width of cropping rectangle (required)
# @param String $height Height of cropping rectangle (required)
# @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional)
# @param File $file (required)
# @return ResponseMessage
#
sub PostCropImage {
my ($self, %args) = @_;
lib/AsposeImagingCloud/ImagingApi.pm view on Meta::CPAN
print "\nResponse Content: ".$response->content;
}
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type'));
return $_response_object;
}
#
# PostImagePng
#
# Update parameters of png image.
#
# @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 im...
# @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional)
# @param File $file (required)
# @return ResponseMessage
#
sub PostImagePng {
my ($self, %args) = @_;
# verify the required parameter 'file' is set
unless (exists $args{'file'}) {
croak("Missing the required parameter 'file' when calling PostImagePng");
}
# parse inputs
my $_resource_path = '/imaging/png/?appSid={appSid}&fromScratch={fromScratch}&outPath={outPath}';
$_resource_path =~ s/\Q&\E/&/g;
$_resource_path =~ s/\Q\/?\E/?/g;
$_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g;
$_resource_path =~ s/\Q{path}\E/{Path}/g;
my $_method = 'POST';
my $query_params = {};
my $header_params = {};
my $form_params = {};
lib/AsposeImagingCloud/ImagingApi.pm view on Meta::CPAN
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type'));
return $_response_object;
}
#
# PostChangeImageScale
#
# Change scale of an image from body
#
# @param String $format Output file format. Valid Formats: Bmp, png, jpg, tiff, psd, gif. (required)
# @param String $newWidth New width of the scaled image. (required)
# @param String $newHeight New height of the scaled image. (required)
# @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional)
# @param File $file (required)
# @return ResponseMessage
#
sub PostChangeImageScale {
my ($self, %args) = @_;
lib/AsposeImagingCloud/ImagingApi.pm view on Meta::CPAN
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type'));
return $_response_object;
}
#
# PostImageRotateFlip
#
# Rotate and flip existing image and get it from response.
#
# @param String $format Number of frame. (Bmp, png, jpg, tiff, psd, gif.) (required)
# @param String $method New width of the scaled image. (Rotate180FlipNone, Rotate180FlipX, Rotate180FlipXY, Rotate180FlipY, Rotate270FlipNone, Rotate270FlipX, Rotate270FlipXY, Rotate270FlipY, Rotate90FlipNone, Rotate90FlipX, Rotate90FlipXY, Rotate90...
# @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional)
# @param File $file (required)
# @return ResponseMessage
#
sub PostImageRotateFlip {
my ($self, %args) = @_;
# verify the required parameter 'format' is set
lib/AsposeImagingCloud/ImagingApi.pm view on Meta::CPAN
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type'));
return $_response_object;
}
#
# PostImageSaveAs
#
# Export existing image to another format. Image is passed as request body.
#
# @param String $format Output file format. (Bmp, png, jpg, tiff, psd, gif.) (required)
# @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional)
# @param File $file (required)
# @return ResponseMessage
#
sub PostImageSaveAs {
my ($self, %args) = @_;
# verify the required parameter 'format' is set
unless (exists $args{'format'}) {
lib/AsposeImagingCloud/ImagingApi.pm view on Meta::CPAN
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type'));
return $_response_object;
}
#
# GetCropImage
#
# Crop existing image
#
# @param String $name The image name. (required)
# @param String $format Output file format. Valid Formats: Bmp, png, jpg, tiff, psd, gif. (required)
# @param String $x X position of start point for cropping rectangle (required)
# @param String $y Y position of start point for cropping rectangle (required)
# @param String $width Width of cropping rectangle (required)
# @param String $height Height of cropping rectangle (required)
# @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional)
# @param String $folder Folder with image to process. (optional)
# @param String $storage (optional)
# @return ResponseMessage
#
sub GetCropImage {
lib/AsposeImagingCloud/ImagingApi.pm view on Meta::CPAN
print "\nResponse Content: ".$response->content;
}
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type'));
return $_response_object;
}
#
# GetImagePng
#
# Update parameters of png image.
#
# @param String $name Filename of image. (required)
# @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 im...
# @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional)
# @param String $folder Folder with image to process. (optional)
# @param String $storage (optional)
# @return ResponseMessage
#
sub GetImagePng {
my ($self, %args) = @_;
# verify the required parameter 'name' is set
unless (exists $args{'name'}) {
croak("Missing the required parameter 'name' when calling GetImagePng");
}
# parse inputs
my $_resource_path = '/imaging/{name}/png/?appSid={appSid}&fromScratch={fromScratch}&outPath={outPath}&folder={folder}&storage={storage}';
$_resource_path =~ s/\Q&\E/&/g;
$_resource_path =~ s/\Q\/?\E/?/g;
$_resource_path =~ s/\QtoFormat={toFormat}\E/format={format}/g;
$_resource_path =~ s/\Q{path}\E/{Path}/g;
my $_method = 'GET';
my $query_params = {};
my $header_params = {};
my $form_params = {};
lib/AsposeImagingCloud/ImagingApi.pm view on Meta::CPAN
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type'));
return $_response_object;
}
#
# GetChangeImageScale
#
# Change scale of an existing image
#
# @param String $name The image name. (required)
# @param String $format Output file format. Valid Formats: Bmp, png, jpg, tiff, psd, gif. (required)
# @param String $newWidth New width of the scaled image. (required)
# @param String $newHeight New height of the scaled image. (required)
# @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional)
# @param String $folder Folder with image to process. (optional)
# @param String $storage (optional)
# @return ResponseMessage
#
sub GetChangeImageScale {
my ($self, %args) = @_;
lib/AsposeImagingCloud/ImagingApi.pm view on Meta::CPAN
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type'));
return $_response_object;
}
#
# GetImageRotateFlip
#
# Rotate and flip existing image
#
# @param String $name Filename of image. (required)
# @param String $format Number of frame. (Bmp, png, jpg, tiff, psd, gif.) (required)
# @param String $method New width of the scaled image. (Rotate180FlipNone, Rotate180FlipX, Rotate180FlipXY, Rotate180FlipY, Rotate270FlipNone, Rotate270FlipX, Rotate270FlipXY, Rotate270FlipY, Rotate90FlipNone, Rotate90FlipX, Rotate90FlipXY, Rotate90...
# @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional)
# @param String $folder Folder with image to process. (optional)
# @param String $storage (optional)
# @return ResponseMessage
#
sub GetImageRotateFlip {
my ($self, %args) = @_;
lib/AsposeImagingCloud/ImagingApi.pm view on Meta::CPAN
my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'ResponseMessage', $response->header('content-type'));
return $_response_object;
}
#
# GetImageSaveAs
#
# Export existing image to another format
#
# @param String $name Filename of image. (required)
# @param String $format Output file format. (Bmp, png, jpg, tiff, psd, gif.) (required)
# @param String $outPath Path to updated file, if this is empty, response contains streamed image. (optional)
# @param String $folder Folder with image to process. (optional)
# @param String $storage (optional)
# @return ResponseMessage
#
sub GetImageSaveAs {
my ($self, %args) = @_;
# verify the required parameter 'name' is set
t/01_imaging_api.t view on Meta::CPAN
my $name = 'sample.bmp';
my $bitsPerPixel = 24;
my $horizontalResolution = 300;
my $verticalResolution = 300;
my $response = $imagingApi->PostImageBmp(bitsPerPixel => $bitsPerPixel, horizontalResolution => $horizontalResolution, verticalResolution => $verticalResolution, file => $data_path.$name);
is($response->{'Status'}, "OK");
};
subtest 'testPostCropImage' => sub {
my $name = 'aspose.jpg';
my $format = 'png';
my $x = 30;
my $y = 40;
my $width = 100;
my $height = 100;
my $response = $imagingApi->PostCropImage(format => $format, x => $x, y => $y, width => $width, height => $height, file => $data_path.$name);
is($response->{'Status'}, "OK");
};
subtest 'testPostImageGif' => sub {
my $name = 'sample.gif';
t/01_imaging_api.t view on Meta::CPAN
subtest 'testPostImageJpg' => sub {
my $name = 'aspose.jpg';
my $quality = 100;
my $compressionType = 'progressive';
my $response = $imagingApi->PostImageJpg(name => $name, quality => $quality, compressionType => $compressionType, file => $data_path.$name);
is($response->{'Status'}, "OK");
};
subtest 'testPostImagePng' => sub {
my $name = 'aspose_imaging_for_cloud.png';
my $fromScratch = 'True';
my $response = $imagingApi->PostImagePng(fromScratch => $fromScratch, file => $data_path.$name);
is($response->{'Status'}, "OK");
};
subtest 'testPostImagePsd' => sub {
my $name = 'sample.psd';
my $channelsCount = 3;
my $compressionMethod = 'rle';
my $response = $imagingApi->PostImagePsd(channelsCount => $channelsCount, compressionMethod => $compressionMethod, file => $data_path.$name);
is($response->{'Status'}, "OK");
};
subtest 'testPostChangeImageScale' => sub {
my $name = 'aspose_imaging_for_cloud.png';
my $format = 'jpg';
my $newWidth = 200;
my $newHeight = 200;
my $response = $imagingApi->PostChangeImageScale(format => $format, newWidth => $newWidth, newHeight => $newHeight, file => $data_path.$name);
is($response->{'Status'}, "OK");
};
subtest 'testPostImageRotateFlip' => sub {
my $name = 'aspose.jpg';
my $format = 'png';
my $method = 'Rotate180FlipX';
my $response = $imagingApi->PostImageRotateFlip(format => $format, method => $method, file => $data_path.$name);
is($response->{'Status'}, "OK");
};
subtest 'testPostImageSaveAs' => sub {
my $name = 'aspose.jpg';
my $format = 'png';
my $response = $imagingApi->PostImageSaveAs(format => $format, file => $data_path.$name);
is($response->{'Status'}, "OK");
};
subtest 'testPostProcessTiff' => sub {
my $name = 'demo.tif';
my $compression = 'ccittfax3';
my $resolutionUnit = 'inch';
my $bitDepth = 1;
my $response = $imagingApi->PostProcessTiff(compression => $compression, resolutionUnit => $resolutionUnit, bitDepth => $bitDepth, file => $data_path.$name);
t/01_imaging_api.t view on Meta::CPAN
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name);
is($response->{'Status'}, "OK");
$response = $imagingApi->GetImageBmp(name=> $name, bitsPerPixel => $bitsPerPixel, horizontalResolution => $horizontalResolution, verticalResolution => $verticalResolution);
is($response->{'Status'}, "OK");
};
subtest 'testGetCropImage' => sub {
my $name = 'aspose.jpg';
my $format = 'png';
my $x = 30;
my $y = 40;
my $width = 100;
my $height = 100;
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name);
is($response->{'Status'}, "OK");
$response = $imagingApi->GetCropImage(name=> $name, format => $format, x => $x, y => $y, width => $width, height => $height);
is($response->{'Status'}, "OK");
t/01_imaging_api.t view on Meta::CPAN
my $name = 'aspose.jpg';
my $quality = 100;
my $compressionType = 'progressive';
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name);
is($response->{'Status'}, "OK");
$response = $imagingApi->GetImageJpg(name => $name, quality => $quality, compressionType => $compressionType);
is($response->{'Status'}, "OK");
};
subtest 'testGetImagePng' => sub {
my $name = 'aspose_imaging_for_cloud.png';
my $fromScratch = 'True';
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name);
is($response->{'Status'}, "OK");
$response = $imagingApi->GetImagePng(name => $name, fromScratch => $fromScratch);
is($response->{'Status'}, "OK");
};
subtest 'testGetImageProperties' => sub {
my $name = 'demo.tif';
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name);
t/01_imaging_api.t view on Meta::CPAN
my $name = 'sample.psd';
my $channelsCount = 3;
my $compressionMethod = 'rle';
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name);
is($response->{'Status'}, "OK");
$response = $imagingApi->GetImagePsd(name => $name, channelsCount => $channelsCount, compressionMethod => $compressionMethod);
is($response->{'Status'}, "OK");
};
subtest 'testGetChangeImageScale' => sub {
my $name = 'aspose_imaging_for_cloud.png';
my $format = 'jpg';
my $newWidth = 200;
my $newHeight = 200;
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name);
is($response->{'Status'}, "OK");
$response = $imagingApi->GetChangeImageScale(name => $name, format => $format, newWidth => $newWidth, newHeight => $newHeight);
is($response->{'Status'}, "OK");
};
subtest 'testGetImageRotateFlip' => sub {
my $name = 'aspose.jpg';
my $format = 'png';
my $method = 'Rotate180FlipX';
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name);
is($response->{'Status'}, "OK");
$response = $imagingApi->GetImageRotateFlip(name => $name, format => $format, method => $method);
is($response->{'Status'}, "OK");
};
subtest 'testGetImageSaveAs' => sub {
my $name = 'aspose.jpg';
my $format = 'png';
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name);
is($response->{'Status'}, "OK");
$response = $imagingApi->GetImageSaveAs(name => $name, format => $format);
is($response->{'Status'}, "OK");
};
subtest 'testGetUpdatedImage' => sub {
my $name = 'TestDemo.tif';
my $format = 'png';
my $x = 96;
my $y = 96;
my $newWidth = 300;
my $newHeight = 300;
my $rectWidth = 200;
my $rectHeight = 200;
my $rotateFlipMethod='';
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name);
is($response->{'Status'}, "OK");