Last active
February 22, 2017 12:14
-
-
Save aspose-imaging/389656e489e157da6672d67401de5f74 to your computer and use it in GitHub Desktop.
This Gist contains C#, Perl and Node.js code snippets for examples of Aspose.Imaging for Cloud
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aspose.Imaging-for-Cloud |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "demo.tif"; | |
String folder = ""; | |
String storage = ""; | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName)); | |
// Invoke Aspose.Imaging Cloud SDK API to get image properties | |
ImagingResponse apiResponse = imagingApi.GetImageProperties(fileName, folder, storage); | |
if (apiResponse != null) | |
{ | |
Console.WriteLine("Get Image Properties, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "sample.bmp"; | |
int bitsPerPixel = 24; | |
int horizontalResolution = 300; | |
int verticalResolution = 300; | |
Boolean fromScratch = false; | |
String outPath = ""; | |
String folder = ""; | |
String storage = ""; | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName)); | |
// Invoke Aspose.Imaging Cloud SDK API to update BMP image properties | |
ResponseMessage apiResponse = imagingApi.GetImageBmp(fileName, bitsPerPixel, horizontalResolution, verticalResolution, fromScratch, outPath, folder, storage); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("Working with BMP Properties - Update BMP Image Properties, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "sample.bmp"; | |
int bitsPerPixel = 24; | |
int horizontalResolution = 300; | |
int verticalResolution = 300; | |
Boolean fromScratch = false; | |
String outPath = ""; | |
byte[] file = System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName); | |
try | |
{ | |
// Invoke Aspose.Imaging Cloud SDK API to update bmp image properies without storage | |
ResponseMessage apiResponse = imagingApi.PostImageBmp(bitsPerPixel, horizontalResolution, verticalResolution, fromScratch, outPath, file); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("Working with BMP Properties - Update BMP Image Properties Without Storage, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "sample.gif"; | |
String backgroundColorIndex = "255"; | |
String colorResolution = "7"; | |
Boolean hasTrailer = true; | |
Boolean interlaced = true; | |
Boolean isPaletteSorted = true; | |
String pixelAspectRatio = "10"; | |
Boolean fromScratch = true; | |
String outPath = ""; | |
String folder = ""; | |
String storage = ""; | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName)); | |
// Invoke Aspose.Imaging Cloud SDK API to update gif image properties | |
ResponseMessage apiResponse = imagingApi.GetImageGif(fileName, backgroundColorIndex, colorResolution, hasTrailer, interlaced, isPaletteSorted, pixelAspectRatio, fromScratch, outPath, folder, storage); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("Working with GIF Properties - Update GIF Image Properties, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "sample.gif"; | |
int backgroundColorIndex = 255; | |
int colorResolution = 7; | |
Boolean hasTrailer = true; | |
Boolean interlaced = true; | |
Boolean isPaletteSorted = true; | |
int pixelAspectRatio = 10; | |
Boolean fromScratch = false; | |
String outPath = ""; | |
byte[] file = System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName); | |
try | |
{ | |
// Invoke Aspose.Imaging Cloud SDK API to update gif image properties without storage | |
ResponseMessage apiResponse = imagingApi.PostImageGif(backgroundColorIndex, colorResolution, hasTrailer, interlaced, isPaletteSorted, pixelAspectRatio, fromScratch, outPath, file); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("Working with GIF Properties - Update GIF Image Properties Without Storage, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "aspose.jpg"; | |
int quality = 100; | |
String compressionType = "progressive"; | |
Boolean fromScratch = false; | |
String outPath = ""; | |
String folder = ""; | |
String storage = ""; | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName)); | |
// Invoke Aspose.Imaging Cloud SDK API to update Jpeg image properties | |
ResponseMessage apiResponse = imagingApi.GetImageJpg(fileName, quality, compressionType, fromScratch, outPath, folder, storage); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("Working with JPG Properties - Update JPG Image Properties, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "aspose.jpg"; | |
int quality = 100; | |
String compressionType = "progressive"; | |
Boolean fromScratch = false; | |
String outPath = ""; | |
byte[] file = System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName); | |
try | |
{ | |
// Invoke Aspose.Imaging Cloud SDK API to update Jpeg image properties without storage | |
ResponseMessage apiResponse = imagingApi.PostImageJpg(quality, compressionType, fromScratch, outPath, file); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("Working with JPG Properties - Update JPG Image Properties Without Storage, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "aspose_imaging_for_cloud.png"; | |
bool fromScratch = true; | |
String outPath = ""; | |
String folder = ""; | |
String storage = ""; | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName)); | |
// Invoke Aspose.Imaging Cloud SDK API to update Png image properties | |
ResponseMessage apiResponse = imagingApi.GetImagePng(fileName, fromScratch, outPath, folder, storage); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("Working with PNG Properties - Update PNG Image Properties, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "aspose_imaging_for_cloud.png"; | |
Boolean fromScratch = true; | |
String outPath = ""; | |
byte[] file = System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName); | |
try | |
{ | |
// Invoke Aspose.Imaging Cloud SDK API to update png image properties without storage | |
ResponseMessage apiResponse = imagingApi.PostImagePng(fromScratch, outPath, file); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("Working with PNG Properties - Update PNG Image Properties Without Storage, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "sample.psd"; | |
int channelsCount = 3; | |
String compressionMethod = "rle"; | |
Boolean fromScratch = false; | |
String outPath = ""; | |
String folder = ""; | |
String storage = ""; | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName)); | |
// Invoke Aspose.Imaging Cloud SDK API to update psd image properties | |
ResponseMessage apiResponse = imagingApi.GetImagePsd(fileName, channelsCount, compressionMethod, fromScratch, outPath, folder, storage); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("Working with PSD Properties - Update PSD Image Properties, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "sample.psd"; | |
int channelsCount = 3; | |
String compressionMethod = "rle"; | |
Boolean fromScratch = false; | |
String outPath = ""; | |
byte[] file = System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName); | |
try | |
{ | |
// Invoke Aspose.Imaging Cloud SDK API to update psd image properties without storage | |
ResponseMessage apiResponse = imagingApi.PostImagePsd(channelsCount, compressionMethod, fromScratch, outPath, file); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("Working with PSD Properties - Update PSD Image Properties Without Storage, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "demo.tif"; | |
String compression = "ccittfax3"; | |
String resolutionUnit = "inch"; | |
int bitDepth = 1; | |
Boolean fromScratch = false; | |
float horizontalResolution = 96.0f; | |
float verticalResolution = 96.0f; | |
String outPath = ""; | |
byte[] file = System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName); | |
try | |
{ | |
// Invoke Aspose.PDF Cloud SDK API to update tiff image properties | |
ResponseMessage apiResponse = imagingApi.PostProcessTiff(compression, resolutionUnit, bitDepth, fromScratch, horizontalResolution, verticalResolution, outPath, file); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("Working with TIFF Properties - Update TIFF Image Properties, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "demo.tif"; | |
String compression = "ccittfax3"; | |
String resolutionUnit = "inch"; | |
int bitDepth = 1; | |
Boolean fromScratch = false; | |
float horizontalResolution = 96.0f; | |
float verticalResolution = 96.0f; | |
String outPath = ""; | |
byte[] file = System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName); | |
try | |
{ | |
// Invoke Aspose.Imaging Cloud SDK API to update tiff image properties without storage | |
ResponseMessage apiResponse = imagingApi.PostProcessTiff(compression, resolutionUnit, bitDepth, fromScratch, horizontalResolution, verticalResolution, outPath, file); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("Working with TIFF Properties - Update TIFF Image Properties Without Storage, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String name = "aspose"; | |
String fileName = name + ".jpg"; | |
String format = "png"; | |
String outPath = ""; | |
byte[] file = System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName); | |
try | |
{ | |
// Invoke Aspose.Imaging Cloud SDK API to convert image format | |
ResponseMessage apiResponse = imagingApi.PostImageSaveAs(format, outPath, file); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + name + "." + format, apiResponse.ResponseStream); | |
Console.WriteLine("Convert Image Format , Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "TestDemo.tif"; | |
String storage = ""; | |
String folder = ""; | |
String outPath = ""; | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName)); | |
// Invoke Aspose.Imaging Cloud SDK API to convert tiff image to fax format | |
ResponseMessage apiResponse = imagingApi.GetTiffToFax(fileName, storage, folder, outPath); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("Converts Tiff Image to Fax Compatible Format, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String name = "aspose"; | |
String fileName = name + ".jpg"; | |
String format = "png"; | |
int x = 30; | |
int y = 40; | |
int width = 100; | |
int height = 100; | |
String outPath = ""; | |
String folder = ""; | |
String storage = ""; | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName)); | |
// Invoke Aspose.Imaging Cloud SDK API to crop image with format change | |
ResponseMessage apiResponse = imagingApi.GetCropImage(fileName, format, x, y, width, height, outPath, folder, storage); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + name + "." + format, apiResponse.ResponseStream); | |
Console.WriteLine("Crop Image with Format Change, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "sample.tif"; | |
String appendFile = "TestDemo.tif"; | |
String storage = ""; | |
String folder = ""; | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName)); | |
storageApi.PutCreate(appendFile, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + appendFile)); | |
// Invoke Aspose.Imaging Cloud SDK API to merge tiff images | |
SaaSposeResponse apiResponse = imagingApi.PostTiffAppend(fileName, appendFile, storage, folder); | |
if (apiResponse != null) | |
{ | |
Com.Aspose.Storage.Model.ResponseMessage storageRes = storageApi.GetDownload(fileName, null, null); | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, storageRes.ResponseStream); | |
Console.WriteLine("Merge Tiff Images, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "aspose.jpg"; | |
String format = "jpg"; | |
int newWidth = 200; | |
int newHeight = 200; | |
int x = 100; | |
int y = 100; | |
int rectWidth = 100; | |
int rectHeight = 100; | |
String rotateFlipMethod = "rotate90flipnone"; | |
String outPath = ""; | |
byte[] file = System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName); | |
try | |
{ | |
// Invoke Aspose.Imaging Cloud SDK API to perform operations on image | |
ResponseMessage apiResponse = imagingApi.PostImageSaveAs(format, newWidth, newHeight, x, y, rectWidth, rectHeight, rotateFlipMethod, outPath, file); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("Perform Several Operations on Image , Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "aspose_imaging_for_cloud.png"; | |
String format = "png"; | |
int newWidth = 200; | |
int newHeight = 200; | |
String outPath = ""; | |
byte[] file = System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName); | |
try | |
{ | |
// Invoke Aspose.Imaging Cloud SDK API to resize image without storage | |
ResponseMessage apiResponse = imagingApi.PostChangeImageScale(format, newWidth, newHeight, outPath, file); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("Resize Image without Storage, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String name = "aspose_imaging_for_cloud"; | |
String fileName = name + ".png"; | |
String format = "jpg"; | |
int newWidth = 200; | |
int newHeight = 200; | |
String outPath = ""; | |
byte[] file = System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName); | |
try | |
{ | |
// Invoke Aspose.Imaging Cloud SDK API to resize image without format change | |
ResponseMessage apiResponse = imagingApi.PostChangeImageScale(format, newWidth, newHeight, outPath, file); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("Resize Image with Format Change, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String name = "aspose"; | |
String fileName = name + ".jpg"; | |
String format = "png"; | |
String method = "Rotate180FlipX"; | |
String outPath = ""; | |
String folder = ""; | |
String storage = ""; | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName)); | |
// Invoke Aspose.Imaging Cloud SDK API to rotate flip image on storage | |
ResponseMessage apiResponse = imagingApi.GetImageRotateFlip(fileName, format, method, outPath, folder, storage); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + name + "." + format, apiResponse.ResponseStream); | |
Console.WriteLine("RotateFlip Image on Storage, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "TestDemo.tif"; | |
int frameId = 0; | |
int newWidth = 200; | |
int newHeight = 200; | |
int x = 20; | |
int y = 20; | |
int rectWidth = 100; | |
int rectHeight = 100; | |
String rotateFlipMethod = ""; | |
Boolean saveOtherFrames = false; | |
String outPath = ""; | |
String folder = ""; | |
String storage = ""; | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName)); | |
// Invoke Aspose.Imaging Cloud SDK API to crop a tiff frame | |
ResponseMessage apiResponse = imagingApi.GetImageFrame(fileName, frameId, newWidth, newHeight, x, y, rectWidth, rectHeight, rotateFlipMethod, saveOtherFrames, outPath, folder, storage); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("Extract Frame from a Multi-Frame TIFF Image, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "sample-multi.tif"; | |
int frameId = 1; | |
int newWidth = 300; | |
int newHeight = 300; | |
int x = 100; | |
int y = 100; | |
int rectWidth = 200; | |
int rectHeight = 200; | |
String rotateFlipMethod = ""; | |
Boolean saveOtherFrames = false; | |
String outPath = ""; | |
String folder = ""; | |
String storage = ""; | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName)); | |
// Invoke Aspose.Imaging Cloud SDK API to extract frame from multi frame tiff image | |
ResponseMessage apiResponse = imagingApi.GetImageFrame(fileName, frameId, newWidth, newHeight, x, y, rectWidth, rectHeight, rotateFlipMethod, saveOtherFrames, outPath, folder, storage); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("Extract Frame from a Multi-Frame TIFF Image, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "TestDemo.tif"; | |
int frameId = 0; | |
String folder = ""; | |
String storage = ""; | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName)); | |
// Invoke Aspose.Imaging Cloud SDK API to get tiff frame properties | |
ImagingResponse apiResponse = imagingApi.GetImageFrameProperties(fileName, frameId, folder, storage); | |
if (apiResponse != null) | |
{ | |
Console.WriteLine("Get TIFF Frame Properties, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "sample-multi.tif"; | |
int frameId = 1; | |
int newWidth = 0; | |
int newHeight = 0; | |
int x = 0; | |
int y = 0; | |
int rectWidth = 0; | |
int rectHeight = 0; | |
String rotateFlipMethod = "rotate90flipnone"; | |
Boolean saveOtherFrames = false; | |
String outPath = ""; | |
String folder = ""; | |
String storage = ""; | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName)); | |
// Invoke Aspose.Imaging Cloud SDK API to manipulate and save frame | |
ResponseMessage apiResponse = imagingApi.GetImageFrame(fileName, frameId, newWidth, newHeight, x, y, rectWidth, rectHeight, rotateFlipMethod, saveOtherFrames, outPath, folder, storage); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("Manipulate a Frame and Save the Modified Frame Along with Unmodified Frames, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "sample-multi.tif"; | |
int frameId = 1; | |
int newWidth = 300; | |
int newHeight = 300; | |
int x = 100; | |
int y = 100; | |
int rectWidth = 200; | |
int rectHeight = 200; | |
String rotateFlipMethod = ""; | |
Boolean saveOtherFrames = false; | |
String outPath = ""; | |
String folder = ""; | |
String storage = ""; | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName)); | |
// Invoke Aspose.Imaging Cloud SDK API to resize tiff frame | |
ResponseMessage apiResponse = imagingApi.GetImageFrame(fileName, frameId, newWidth, newHeight, x, y, rectWidth, rectHeight, rotateFlipMethod, saveOtherFrames, outPath, folder, storage); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("Resize a TIFF Frame, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
ImagingApi imagingApi = new ImagingApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); | |
String fileName = "TestDemo.tif"; | |
int frameId = 0; | |
int newWidth = 0; | |
int newHeight = 0; | |
int x = 0; | |
int y = 0; | |
int rectWidth = 0; | |
int rectHeight = 0; | |
String rotateFlipMethod = "rotate90flipnone"; | |
Boolean saveOtherFrames = false; | |
String outPath = ""; | |
String folder = ""; | |
String storage = ""; | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName)); | |
// Invoke Aspose.Imaging Cloud SDK API to RotateFlip a TIFF Frame | |
ResponseMessage apiResponse = imagingApi.GetImageFrame(fileName, frameId, newWidth, newHeight, x, y, rectWidth, rectHeight, rotateFlipMethod, saveOtherFrames, outPath, folder, storage); | |
if (apiResponse != null) | |
{ | |
System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, apiResponse.ResponseStream); | |
Console.WriteLine("RotateFlip a TIFF Frame, Done!"); | |
Console.ReadKey(); | |
} | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "demo.tif"; | |
var folder = null; | |
var storage = null; | |
try { | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(name, null, storage, data_path + name , function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Invoke Aspose.Imaging Cloud SDK API to get image properties | |
imagingApi.GetImageProperties(name, folder, storage, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
var tiffProperties = responseMessage.body.TiffProperties; | |
}); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "sample.bmp"; | |
var bitsPerPixel = 24; | |
var horizontalResolution = 300; | |
var verticalResolution = 300; | |
var folder = null; | |
var storage = null; | |
try { | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(name, null, storage, data_path + name , function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Invoke Aspose.Imaging Cloud SDK API to update BMP specific properties | |
imagingApi.GetImageBmp(name, bitsPerPixel, horizontalResolution, verticalResolution, null, null, folder, storage, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
if(config.debug){console.log('body:', responseMessage.body);} | |
var outfilename = name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "sample.bmp"; | |
var bitsPerPixel = 24; | |
var horizontalResolution = 300; | |
var verticalResolution = 300; | |
var folder = null; | |
var storage = null; | |
try { | |
// Invoke Aspose.Imaging Cloud SDK API to update BMP specific properties without using cloud storage | |
imagingApi.PostImageBmp(bitsPerPixel, horizontalResolution, verticalResolution, null, null, data_path + name, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
if(config.debug){console.log('body:', responseMessage.body);} | |
var outfilename = name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "sample.gif"; | |
var backgroundColorIndex = 255; | |
var colorResolution = 7; | |
var pixelAspectRatio = 10; | |
var folder = null; | |
var storage = null; | |
try { | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(name, null, storage, data_path + name , function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Invoke Aspose.Imaging Cloud SDK API to update GIF specific properties | |
imagingApi.GetImageGif(name, backgroundColorIndex, colorResolution, null, null, null, pixelAspectRatio, null, null, folder, storage, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
var outfilename = name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "sample.gif"; | |
var backgroundColorIndex = 255; | |
var colorResolution = 7; | |
var pixelAspectRatio = 10; | |
try { | |
// Invoke Aspose.Imaging Cloud SDK API to update GIF specific properties without using cloud storage | |
imagingApi.PostImageGif(backgroundColorIndex, colorResolution, null, null, null, pixelAspectRatio, null, null, data_path + name, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
var outfilename = name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "aspose.jpg"; | |
var quality = 100; | |
var compressionType = "progressive"; | |
var storage = null; | |
try { | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(name, null, storage, data_path + name , function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Invoke Aspose.Imaging Cloud SDK API to update JPG specific properties | |
imagingApi.GetImageJpg(name, quality, compressionType, null, null, null, null, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
var outfilename = name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "aspose.jpg"; | |
var quality = 100; | |
var compressionType = "progressive"; | |
try { | |
// Invoke Aspose.Imaging Cloud SDK API to update JPG specific properties without using cloud storage | |
imagingApi.PostImageJpg(quality, compressionType, null, null, data_path + name, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
var outfilename = name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "aspose_imaging_for_cloud.png"; | |
var folder = null; | |
var storage = null; | |
try { | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(name, null, storage, data_path + name , function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Invoke Aspose.Imaging Cloud SDK API to update PNG specific properties | |
imagingApi.GetImagePng(name, false, null, folder, storage, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
var outfilename = name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "aspose_imaging_for_cloud.png"; | |
try { | |
// Invoke Aspose.Imaging Cloud SDK API to update PNG specific properties without using cloud storage | |
imagingApi.PostImagePng(false, null, data_path + name, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
var outfilename = name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "sample.psd"; | |
var channelsCount = 3; | |
var compressionMethod = "rle"; | |
var storage = null; | |
var folder = null; | |
try { | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(name, null, storage, data_path + name , function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Invoke Aspose.Imaging Cloud SDK API to update PSD specific properties | |
imagingApi.GetImagePsd(name, channelsCount, compressionMethod, null, null, folder, storage, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
var outfilename = name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "sample.psd"; | |
var channelsCount = 3; | |
var compressionMethod = "rle"; | |
try { | |
// Invoke Aspose.Imaging Cloud SDK API to update PSD specific properties without using cloud storage | |
imagingApi.PostImagePsd(channelsCount, compressionMethod, null, null, data_path + name, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
var outfilename = name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "demo.tif"; | |
var compression = "ccittfax3"; | |
var resolutionUnit = "inch"; | |
var bitDepth = 1; | |
var storage = null; | |
try { | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(name, null, storage, data_path + name , function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Invoke Aspose.Imaging Cloud SDK API to update Tiff specific properties | |
imagingApi.PostProcessTiff(compression, resolutionUnit, bitDepth, null, null, null, null, data_path+name, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
var outfilename = name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "demo.tif"; | |
var compression = "ccittfax3"; | |
var resolutionUnit = "inch"; | |
var bitDepth = 1; | |
try { | |
// Invoke Aspose.Imaging Cloud SDK API to update Tiff specific properties without using cloud storage | |
imagingApi.PostProcessTiff(compression, resolutionUnit, bitDepth, null, null, null, null, data_path + name, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
var outfilename = name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var fileName = "aspose"; | |
var name = fileName + ".jpg"; | |
var format = "png"; | |
try { | |
// Invoke Aspose.Imaging Cloud SDK API to perform format change operation without using cloud storage | |
imagingApi.PostImageSaveAs(format, null, data_path + name, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Download image from API response | |
var outfilename = fileName + "." + format; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "TestDemo.tif"; | |
var storage = null; | |
var folder = null; | |
try { | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(name, null, storage, data_path + name , function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Invoke Aspose.Imaging Cloud SDK API to update TIFF file and convert it to Fax compatible format | |
imagingApi.GetTiffToFax(name, storage, folder, null, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Download image from API response | |
var outfilename = name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var fileName = "aspose"; | |
var name = fileName + ".jpg"; | |
var format = "png"; | |
var x = 30; | |
var y = 40; | |
var width = 100; | |
var height = 100; | |
var storage = null; | |
var folder = null; | |
try { | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(name, null, storage, data_path + name , function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Invoke Aspose.Imaging Cloud SDK API to perform crop operation on an image | |
imagingApi.GetCropImage(name, format, x, y, width, height, null, folder, storage, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Download image from API response | |
var outfilename = name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "TestDemo.tif"; | |
var appendFile = "TestDemo.tif"; | |
var storage = null; | |
var folder = null; | |
try { | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(name, null, storage, data_path + name , function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
storageApi.PutCreate(appendFile, null, storage, data_path + appendFile , function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Invoke Aspose.Imaging Cloud SDK API to merge TIFF files | |
imagingApi.PostTiffAppend(name, appendFile, storage, folder, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Download image from storage server | |
storageApi.GetDownload(name, null, null, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
var outfilename = 'appended-' + name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}); | |
}); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var fileName = "aspose_imaging_for_cloud"; | |
var name = fileName + ".png"; | |
var format = "png"; | |
var x = 96; | |
var y = 96; | |
var newWidth = 300; | |
var newHeight = 300; | |
var rectWidth = 200; | |
var rectHeight = 200; | |
var rotateFlipMethod = "RotateNoneFlipNone"; | |
try { | |
// Invoke Aspose.Imaging Cloud SDK API to perform crop, resize, rotation & export operations on an image in a single call | |
imagingApi.PostImageOperationsSaveAs(format, newWidth, newHeight, x, y, rectWidth, rectHeight, rotateFlipMethod, null, data_path + name, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Download image from API response | |
var outfilename = fileName + "." + format; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var fileName = "aspose_imaging_for_cloud"; | |
var name = fileName + ".png"; | |
var format = "jpg"; | |
var newWidth = 200; | |
var newHeight = 200; | |
try { | |
// Invoke Aspose.Imaging Cloud SDK API to perform re-size operation without using cloud storage | |
imagingApi.PostChangeImageScale(format, newWidth, newHeight, null, data_path + name, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Download image from API response | |
var outfilename = fileName + "." + format; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var fileName = "aspose_imaging_for_cloud"; | |
var name = fileName + ".png"; | |
var format = "jpg"; | |
var newWidth = 200; | |
var newHeight = 200; | |
try { | |
// Invoke Aspose.Imaging Cloud SDK API to perform re-size operation without using cloud storage | |
imagingApi.PostChangeImageScale(format, newWidth, newHeight, null, data_path + name, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Download image from API response | |
var outfilename = fileName + "." + format; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var fileName = "aspose"; | |
var name = fileName + ".jpg"; | |
var format = "png"; | |
var method = "Rotate180FlipX"; | |
var storage = null; | |
var folder = null; | |
try { | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(name, null, storage, data_path + name , function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Invoke Aspose.Imaging Cloud SDK API to perform RotateFlip operation on an image | |
imagingApi.GetImageRotateFlip(name, format, method, null, folder, storage, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Download image from API response | |
var outfilename = name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "TestDemo.tif"; | |
var frameId = 0; | |
var newWidth = 200; | |
var newHeight = 200; | |
var x = 20; | |
var y = 20; | |
var rectWidth = 100; | |
var rectHeight = 100; | |
var storage = null; | |
var folder = null; | |
try { | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(name, null, storage, data_path + name , function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Invoke Aspose.Imaging Cloud SDK API to extract and crop a frame from a Tiff image | |
imagingApi.GetImageFrame(name, frameId, newWidth, newHeight, x, y, rectWidth, rectHeight, null, null, null, folder, storage, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Download image from API response | |
var outfilename = name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "sample-multi.tif"; | |
var frameId = 1; | |
var storage = null; | |
var folder = null; | |
try { | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(name, null, storage, data_path + name , function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Invoke Aspose.Imaging Cloud SDK API to extract only one frame from a Tiff image | |
imagingApi.GetImageFrame(name, frameId, null, null, null, null, null, null, null, null, null, folder, storage, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Download image from API response | |
var outfilename = name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "sample-multi.tif"; | |
var frameId = 1; | |
var storage = null; | |
var folder = null; | |
try { | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(name, null, storage, data_path + name , function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Invoke Aspose.Imaging Cloud SDK API to retrieve properties of a specific Tiff Frame | |
imagingApi.GetImageFrameProperties(name, frameId, folder, storage, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
var tiffProperties = responseMessage.body.TiffProperties; | |
}); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "sample-multi.tif"; | |
var frameId = 1; | |
var rotateFlipMethod = "rotate90flipnone"; | |
var storage = null; | |
var folder = null; | |
try { | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(name, null, storage, data_path + name , function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Invoke Aspose.Imaging Cloud SDK API to extract and RotateFlip a frame and save with unmodified frames in a Tiff image | |
imagingApi.GetImageFrame(name, frameId, null, null, null, null, null, null, rotateFlipMethod, null, null, folder, storage, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Download image from API response | |
var outfilename = name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "TestDemo.tif"; | |
var frameId = 0; | |
var newWidth = 300; | |
var newHeight = 300; | |
var x = 96; | |
var y = 96; | |
var rectWidth = 200; | |
var rectHeight = 200; | |
var storage = null; | |
var folder = null; | |
try { | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(name, null, storage, data_path + name , function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Invoke Aspose.Imaging Cloud SDK API to extract and resize one frame from a Tiff image | |
imagingApi.GetImageFrame(name, frameId, newWidth, newHeight, x, y, rectWidth, rectHeight, null, null, null, folder, storage, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Download image from API response | |
var outfilename = name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
var fs = require('fs'); | |
var assert = require('assert'); | |
var ImagingApi = require('asposeimagingcloud'); | |
var StorageApi = require('asposestoragecloud'); | |
var configProps = require('../Config/config.json'); | |
var data_path = '../../../../Data/'; | |
var AppSID = configProps.app_sid; | |
var AppKey = configProps.api_key; | |
var outFolder = configProps.out_folder; | |
var config = {'appSid':AppSID,'apiKey':AppKey , 'debug' : true}; | |
// Instantiate Aspose Storage API SDK | |
var storageApi = new StorageApi(config); | |
// Instantiate Aspose.Imaging API SDK | |
var imagingApi = new ImagingApi(config); | |
// Set input file name | |
var name = "TestDemo.tif"; | |
var frameId = 0; | |
var rotateFlipMethod = "rotate270flipnone"; | |
var storage = null; | |
var folder = null; | |
try { | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(name, null, storage, data_path + name , function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Invoke Aspose.Imaging Cloud SDK API to extract and RotateFlip a frame from a Tiff image | |
imagingApi.GetImageFrame(name, frameId, null, null, null, null, null, null, rotateFlipMethod, null, null, folder, storage, function(responseMessage) { | |
assert.equal(responseMessage.status, 'OK'); | |
// Download image from API response | |
var outfilename = name; | |
var writeStream = fs.createWriteStream(data_path + outfilename); | |
writeStream.write(responseMessage.body); | |
}); | |
}); | |
}catch (e) { | |
console.log("exception in example"); | |
console.log(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'demo.tif'; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to get image properties | |
$response = $imagingApi->GetImageProperties(name=>$name); | |
if($response->{'Status'} eq 'OK'){ | |
my $tiffProperties = $response->{'TiffProperties'}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'sample.bmp'; | |
my $bitsPerPixel = 24; | |
my $horizontalResolution = 300; | |
my $verticalResolution = 300; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to update BMP specific properties | |
$response = $imagingApi->GetImageBmp(name=> $name, bitsPerPixel => $bitsPerPixel, horizontalResolution => $horizontalResolution, verticalResolution => $verticalResolution); | |
if($response->{'Status'} eq 'OK'){ | |
my $output_file = $out_path. $name; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'sample.bmp'; | |
my $bitsPerPixel = 24; | |
my $horizontalResolution = 300; | |
my $verticalResolution = 300; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to update BMP specific properties without using cloud storage | |
$response = $imagingApi->PostImageBmp(bitsPerPixel => $bitsPerPixel, horizontalResolution => $horizontalResolution, verticalResolution => $verticalResolution, file => $data_path.$name); | |
if($response->{'Status'} eq 'OK'){ | |
my $output_file = $out_path. $name; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'sample.gif'; | |
my $backgroundColorIndex = 255; | |
my $colorResolution = 7; | |
my $pixelAspectRatio = 10; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to update GIF specific properties | |
$response = $imagingApi->GetImageGif(name=> $name, backgroundColorIndex => $backgroundColorIndex, colorResolution => $colorResolution, pixelAspectRatio => $pixelAspectRatio); | |
if($response->{'Status'} eq 'OK'){ | |
my $output_file = $out_path. $name; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'sample.gif'; | |
my $backgroundColorIndex = 255; | |
my $colorResolution = 7; | |
my $pixelAspectRatio = 10; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to update GIF specific properties without using cloud storage | |
$response = $imagingApi->PostImageGif(backgroundColorIndex => $backgroundColorIndex, colorResolution => $colorResolution, pixelAspectRatio => $pixelAspectRatio, file => $data_path.$name); | |
if($response->{'Status'} eq 'OK'){ | |
my $output_file = $out_path. $name; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'aspose.jpg'; | |
my $quality = 100; | |
my $compressionType = 'progressive'; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to update JPG specific properties | |
$response = $imagingApi->GetImageJpg(name => $name, quality => $quality, compressionType => $compressionType); | |
if($response->{'Status'} eq 'OK'){ | |
my $output_file = $out_path. $name; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'aspose.jpg'; | |
my $quality = 100; | |
my $compressionType = 'progressive'; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to update JPG specific properties without using cloud storage | |
$response = $imagingApi->PostImageJpg(name => $name, quality => $quality, compressionType => $compressionType, file => $data_path.$name); | |
if($response->{'Status'} eq 'OK'){ | |
my $output_file = $out_path. $name; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'aspose_imaging_for_cloud.png'; | |
my $fromScratch = 'True'; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to update PNG specific properties | |
$response = $imagingApi->GetImagePng(name => $name, fromScratch => $fromScratch); | |
if($response->{'Status'} eq 'OK'){ | |
my $output_file = $out_path.$name; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'aspose_imaging_for_cloud.png'; | |
my $fromScratch = 'True'; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to update PNG specific properties without using cloud storage | |
my $response = $imagingApi->PostImagePng(fromScratch => $fromScratch, file => $data_path.$name); | |
if($response->{'Status'} eq 'OK'){ | |
my $output_file = $out_path.$name; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'sample.psd'; | |
my $channelsCount = 3; | |
my $compressionMethod = 'rle'; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to update PSD specific properties | |
$response = $imagingApi->GetImagePsd(name => $name, channelsCount => $channelsCount, compressionMethod => $compressionMethod); | |
if($response->{'Status'} eq 'OK'){ | |
my $output_file = $out_path.$name; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'sample.psd'; | |
my $channelsCount = 3; | |
my $compressionMethod = 'rle'; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to update PSD specific properties without using cloud storage | |
$response = $imagingApi->PostImagePsd(channelsCount => $channelsCount, compressionMethod => $compressionMethod, file => $data_path.$name); | |
if($response->{'Status'} eq 'OK'){ | |
my $output_file = $out_path.$name; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'demo.tif'; | |
my $compression = 'ccittfax3'; | |
my $resolutionUnit = 'inch'; | |
my $bitDepth = 1; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to update Tiff specific properties | |
$response = $imagingApi->PostProcessTiff(compression => $compression, resolutionUnit => $resolutionUnit, bitDepth => $bitDepth, file => $data_path.$name); | |
if($response->{'Status'} eq 'OK'){ | |
my $output_file = $out_path. $name; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'demo.tif'; | |
my $compression = 'ccittfax3'; | |
my $resolutionUnit = 'inch'; | |
my $bitDepth = 1; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to update Tiff specific properties without using cloud storage | |
$response = $imagingApi->PostProcessTiff(compression => $compression, resolutionUnit => $resolutionUnit, bitDepth => $bitDepth, file => $data_path.$name); | |
if($response->{'Status'} eq 'OK'){ | |
my $output_file = $out_path. $name; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $filename = 'aspose'; | |
my $name = $filename . '.jpg'; | |
my $format = "png"; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to perform format change operation without using cloud storage | |
$response = $imagingApi->PostImageSaveAs(format => $format, file => $data_path.$name); | |
if($response->{'Status'} eq 'OK'){ | |
my $output_file = $out_path.$filename . '.' . $format; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'TestDemo.tif'; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to update TIFF file and convert it to Fax compatible format | |
$response = $imagingApi->GetTiffToFax(name => $name); | |
if($response->{'Status'} eq 'OK'){ | |
my $output_file = $out_path. $name; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'aspose.jpg'; | |
my $format = 'png'; | |
my $x = 30; | |
my $y = 40; | |
my $width = 100; | |
my $height = 100; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to perform crop operation on an image | |
$response = $imagingApi->GetCropImage(name=> $name, format => $format, x => $x, y => $y, width => $width, height => $height); | |
if($response->{'Status'} eq 'OK'){ | |
my $output_file = $out_path.$name; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'sample.tif'; | |
my $appendFile = 'TestDemo.tif'; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
$response = $storageApi->PutCreate(Path => $appendFile, file => $data_path.$appendFile); | |
# Invoke Aspose.Imaging Cloud SDK API to merge TIFF files | |
$response = $imagingApi->PostTiffAppend(name => $name, appendFile => $appendFile); | |
if($response->{'Status'} eq 'OK'){ | |
# Download image from storage server | |
my $output_file = $out_path. 'appended-' . $name; | |
$response = $storageApi->GetDownload(Path => $name); | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'TestDemo.tif'; | |
my $format = 'tif'; | |
my $x = 96; | |
my $y = 96; | |
my $newWidth = 300; | |
my $newHeight = 300; | |
my $rectWidth = 200; | |
my $rectHeight = 200; | |
my $rotateFlipMethod='RotateNoneFlipNone'; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to perform crop, resize, rotation & export operations on an image in a single call | |
$response = $imagingApi->PostImageOperationsSaveAs(name=> $name, format => $format, x => $x, y => $y, newWidth => $newWidth, newHeight => $newHeight, rectWidth => $rectWidth, rectHeight => $rectHeight, rotateFlipMethod => $rotateFlipMethod, file => $data_path.$name); | |
if($response->{'Status'} eq 'OK'){ | |
# Download image from API response | |
my $output_file = $out_path. $name; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $filename = 'aspose_imaging_for_cloud'; | |
my $name = $filename . '.png'; | |
my $format = 'jpg'; | |
my $newWidth = 200; | |
my $newHeight = 200; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to perform re-size operation without using cloud storage | |
$response = $imagingApi->PostChangeImageScale(name=> $name, format => $format, newWidth => $newWidth, newHeight => $newHeight, file => $data_path.$name); | |
if($response->{'Status'} eq 'OK'){ | |
# Download image from API response | |
my $output_file = $out_path.$filename . '.' . $format; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $filename = 'aspose_imaging_for_cloud'; | |
my $name = $filename . '.png'; | |
my $format = 'jpg'; | |
my $newWidth = 200; | |
my $newHeight = 200; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to perform re-size operation without using cloud storage | |
$response = $imagingApi->PostChangeImageScale(name=> $name, format => $format, newWidth => $newWidth, newHeight => $newHeight, file => $data_path.$name); | |
if($response->{'Status'} eq 'OK'){ | |
# Download image from API response | |
my $output_file = $out_path. $filename . '.' . $format; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $filename = 'aspose'; | |
my $name = $filename . '.jpg'; | |
my $format = 'png'; | |
my $method='Rotate180FlipX'; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to perform RotateFlip operation on an image | |
$response = $imagingApi->GetImageRotateFlip(name => $name, format => $format, method => $method); | |
if($response->{'Status'} eq 'OK'){ | |
# Download image from API response | |
my $output_file = $out_path.$filename . '.' . $format; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'TestDemo.tif'; | |
my $frameId = 0; | |
my $newWidth = 200; | |
my $newHeight = 200; | |
my $x = 20; | |
my $y = 20; | |
my $rectWidth = 100; | |
my $rectHeight = 100; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to extract and crop a frame from a Tiff image | |
$response = $imagingApi->GetImageFrame(name=> $name, frameId => $frameId, x => $x, y => $y, newWidth => $newWidth, newHeight => $newHeight, rectWidth => $rectWidth, rectHeight => $rectHeight); | |
if($response->{'Status'} eq 'OK'){ | |
my $output_file = $out_path. $name; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'sample-multi.tif'; | |
my $frameId = 1; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to extract only one frame from a Tiff image | |
$response = $imagingApi->GetImageFrame(name=> $name, frameId => $frameId); | |
if($response->{'Status'} eq 'OK'){ | |
my $output_file = $out_path. $name; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'sample-multi.tif'; | |
my $frameId = 1; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to retrieve properties of a specific Tiff Frame | |
$response = $imagingApi->GetImageFrameProperties(name=> $name, frameId => $frameId); | |
if($response->{'Status'} eq 'OK'){ | |
my $tiffProperties = $response->{'TiffProperties'}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'sample-multi.tif'; | |
my $frameId = 1; | |
my $rotateFlipMethod = 'rotate90flipnone'; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to extract and RotateFlip a frame and save with unmodified frames in a Tiff image | |
$response = $imagingApi->GetImageFrame(name=> $name, frameId => $frameId, rotateFlipMethod => $rotateFlipMethod); | |
if($response->{'Status'} eq 'OK'){ | |
my $output_file = $out_path. $name; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'TestDemo.tif'; | |
my $frameId = 0; | |
my $newWidth = 300; | |
my $newHeight = 300; | |
my $x = 96; | |
my $y = 96; | |
my $rectWidth = 200; | |
my $rectHeight = 200; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to extract and resize one frame from a Tiff image | |
$response = $imagingApi->GetImageFrame(name=> $name, frameId => $frameId, x => $x, y => $y, newWidth => $newWidth, newHeight => $newHeight, rectWidth => $rectWidth, rectHeight => $rectHeight); | |
if($response->{'Status'} eq 'OK'){ | |
my $tiffProperties = $response->{'TiffProperties'}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Slurp; # From CPAN | |
use JSON; | |
use AsposeStorageCloud::StorageApi; | |
use AsposeStorageCloud::ApiClient; | |
use AsposeStorageCloud::Configuration; | |
use AsposeImagingCloud::ImagingApi; | |
use AsposeImagingCloud::ApiClient; | |
use AsposeImagingCloud::Configuration; | |
my $configFile = '../Config/config.json'; | |
my $configPropsText = read_file($configFile); | |
my $configProps = decode_json($configPropsText); | |
my $data_path = '../../../../Data/'; | |
my $out_path = $configProps->{'out_folder'}; | |
$AsposeImagingCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeImagingCloud::Configuration::api_key = $configProps->{'api_key'}; | |
$AsposeImagingCloud::Configuration::debug = 1; | |
$AsposeStorageCloud::Configuration::app_sid = $configProps->{'app_sid'}; | |
$AsposeStorageCloud::Configuration::api_key = $configProps->{'api_key'}; | |
# Instantiate Aspose.Storage and Aspose.Imaging API SDK | |
my $storageApi = AsposeStorageCloud::StorageApi->new(); | |
my $imagingApi = AsposeImagingCloud::ImagingApi->new(); | |
# Set input file name | |
my $name = 'TestDemo.tif'; | |
my $frameId = 0; | |
my $rotateFlipMethod = 'rotate270flipnone'; | |
# Upload file to aspose cloud storage | |
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name); | |
# Invoke Aspose.Imaging Cloud SDK API to extract and RotateFlip a frame from a Tiff image | |
$response = $imagingApi->GetImageFrame(name=> $name, frameId => $frameId, rotateFlipMethod => $rotateFlipMethod); | |
if($response->{'Status'} eq 'OK'){ | |
my $output_file = $out_path. $name; | |
write_file($output_file, { binmode => ":raw" }, $response->{'Content'}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment