Last active
March 6, 2017 11:26
-
-
Save aspose-imaging/8533bbe9fb536438015bcadc020759d8 to your computer and use it in GitHub Desktop.
Aspose_Imaging_Cloud_Android
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-tasks/Aspose.Tasks-for-Java | |
String input = "Sample1.tiff"; | |
// Instantiate Aspose Storage Cloud API SDK | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Instantiate Aspose BarCode Cloud API SDK | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
File inputFile = Utils.stream2file("sample1","tiff", context.getResources().openRawResource(R.raw.sample1)); | |
storageApi.PutCreate( | |
input, | |
null, | |
Utils.STORAGE, | |
inputFile); | |
com.aspose.imaging.model.ImagingResponse apiResponse | |
= imagingApi.GetImageProperties( | |
input, | |
Utils.FOLDER, | |
Utils.STORAGE | |
); | |
System.out.println(" Image Property : Height = " +apiResponse.getHeight()); |
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-tasks/Aspose.Tasks-for-Java | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
String input = "Sample2.bmp"; | |
String output = "Sample2.bmp"; | |
File inputFile = Utils.stream2file("Sample2","bmp", context.getResources().openRawResource(R.raw.sample2)); | |
File outputFile = Utils.createTempFile("sample3","bmp"); | |
Integer bitsPerPixel = 24; | |
Integer horizontalResolution = 300; | |
Integer verticalResolution = 300; | |
Boolean fromScratch = false; | |
String outPath = ""; | |
storageApi.PutCreate( | |
input, | |
null, | |
Utils.STORAGE, | |
inputFile | |
); | |
imagingApi.GetImageBmp( | |
input, | |
bitsPerPixel, | |
horizontalResolution, | |
verticalResolution, | |
fromScratch, | |
outPath, | |
Utils.FOLDER, | |
Utils.STORAGE | |
); | |
com.aspose.storage.model.ResponseMessage sr | |
= storageApi.GetDownload( | |
input, | |
null, | |
Utils.STORAGE | |
); | |
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
String input = "Sample2.bmp"; | |
String output = "Sample3.bmp"; | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
File inputFile = Utils.stream2file("sample1","bmp", context.getResources().openRawResource(R.raw.sample1)); | |
File outputFile = Utils.createTempFile("Sample3", "bmp"); | |
Integer bitsPerPixel = 24; | |
Integer horizontalResolution = 300; | |
Integer verticalResolution = 300; | |
Boolean fromScratch = false; | |
String outPath = ""; | |
com.aspose.imaging.model.ResponseMessage sr =imagingApi.PostImageBmp( | |
bitsPerPixel, | |
horizontalResolution, | |
verticalResolution, | |
fromScratch, | |
outPath, | |
inputFile | |
); | |
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
String input = "Sample1.gif"; | |
String output = "Sample2.gif"; | |
File inputFile = Utils.stream2file("sample4","gif", context.getResources().openRawResource(R.raw.sample4)); | |
File outputFile = Utils.createTempFile("sample3","gif"); | |
Integer backgroundColorIndex = 255; | |
Integer colorResolution = 7; | |
Boolean hasTrailer = true; | |
Boolean interlaced = true; | |
Boolean isPaletteSorted = true; | |
Integer pixelAspectRatio = 10; | |
Boolean fromScratch = false; | |
String outPath = ""; | |
storageApi.PutCreate( | |
input, | |
null, | |
null, | |
inputFile | |
); | |
imagingApi.GetImageGif( | |
input, | |
backgroundColorIndex, | |
colorResolution, | |
hasTrailer, | |
interlaced, | |
isPaletteSorted, | |
pixelAspectRatio, | |
fromScratch, | |
outPath, | |
"", | |
null | |
); | |
com.aspose.storage.model.ResponseMessage sr | |
= storageApi.GetDownload( | |
input, | |
null, | |
null | |
); | |
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
File inputFile = Utils.stream2file("sample4","gif", context.getResources().openRawResource(R.raw.sample4)); | |
File outputFile = Utils.createTempFile("sample3","gif"); | |
Integer backgroundColorIndex = 255; | |
Integer colorResolution = 7; | |
Boolean hasTrailer = true; | |
Boolean interlaced = true; | |
Boolean isPaletteSorted = true; | |
Integer pixelAspectRatio = 10; | |
Boolean fromScratch = false; | |
String outPath = ""; | |
com.aspose.imaging.model.ResponseMessage sr = imagingApi.PostImageGif( | |
backgroundColorIndex, | |
colorResolution, | |
hasTrailer, | |
interlaced, | |
isPaletteSorted, | |
pixelAspectRatio, | |
fromScratch, | |
outPath, | |
inputFile | |
); | |
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
String input = "Sample5.jpg"; | |
String output = "Sample2.jpg"; | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
File inputFile = Utils.stream2file("sample5","jpg", context.getResources().openRawResource(R.raw.sample5)); | |
File outputFile = Utils.createTempFile("sample3","jpg"); | |
Integer quality = 100; | |
String compressionType = "progressive"; | |
Boolean fromScratch = false; | |
String outPath = ""; | |
storageApi.PutCreate( | |
input, | |
null, | |
Utils.STORAGE, | |
inputFile | |
); | |
imagingApi.GetImageJpg( | |
input, | |
quality, | |
compressionType, | |
fromScratch, | |
outPath, | |
Utils.FOLDER, | |
Utils.STORAGE | |
); | |
com.aspose.storage.model.ResponseMessage sr | |
=storageApi.GetDownload( | |
input, | |
null, | |
Utils.STORAGE | |
); | |
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile); | |
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-tasks/Aspose.Tasks-for-Java | |
String input = "Sample1.jpg"; | |
String output = "Sample2.jpg"; | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
File inputFile = Utils.stream2file("sample5","jpg", context.getResources().openRawResource(R.raw.sample5)); | |
File outputFile = Utils.createTempFile("sample3","gif"); | |
Integer quality = 100; | |
String compressionType = "progressive"; | |
Boolean fromScratch = false; | |
String outPath = ""; | |
com.aspose.imaging.model.ResponseMessage sr = imagingApi.PostImageJpg( | |
quality, | |
compressionType, | |
fromScratch, | |
outPath, | |
inputFile | |
); | |
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
String input = "Sample1.png"; | |
String output = "Sample2.png"; | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
File inputFile = Utils.stream2file("sample6","png", context.getResources().openRawResource(R.raw.sample6)); | |
File outputFile = Utils.createTempFile("sample3","png"); | |
Boolean fromScratch = false; | |
String outPath = ""; | |
storageApi.PutCreate( | |
input, | |
null, | |
Utils.STORAGE, | |
inputFile | |
); | |
imagingApi.GetImagePng( | |
input, | |
fromScratch, | |
outPath, | |
Utils.FOLDER, | |
Utils.STORAGE | |
); | |
com.aspose.storage.model.ResponseMessage sr | |
= storageApi.GetDownload( | |
input, | |
null, | |
Utils.STORAGE | |
); | |
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
String input = "Sample1.png"; | |
String output = "Sample2.png"; | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
File inputFile = Utils.stream2file("sample6","png", context.getResources().openRawResource(R.raw.sample6)); | |
File outputFile = Utils.createTempFile("sample3","png"); | |
Boolean fromScratch = true; | |
String outPath = ""; | |
com.aspose.imaging.model.ResponseMessage sr = imagingApi.PostImagePng( | |
fromScratch, | |
outPath, | |
inputFile | |
); | |
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
String input = "Sample1.psd"; | |
String output = "Sample2.psd"; | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
File inputFile = Utils.stream2file("sample7","psd", context.getResources().openRawResource(R.raw.sample7)); | |
File outputFile = Utils.createTempFile("sample3","psd"); | |
Integer channelsCount = 3; | |
String compressionMethod = "rle"; | |
Boolean fromScratch = false; | |
String outPath = ""; | |
storageApi.PutCreate( | |
input, | |
null, | |
Utils.STORAGE, | |
inputFile | |
); | |
imagingApi.GetImagePsd( | |
input, | |
channelsCount, | |
compressionMethod, | |
fromScratch, | |
outPath, | |
Utils.FOLDER, | |
Utils.STORAGE | |
); | |
com.aspose.storage.model.ResponseMessage sr | |
= storageApi.GetDownload( | |
input, | |
null, | |
Utils.STORAGE | |
); | |
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
String input = "Sample1.psd"; | |
String output = "Sample2.psd"; | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
File inputFile = Utils.stream2file("sample7","psd", context.getResources().openRawResource(R.raw.sample7)); | |
File outputFile = Utils.createTempFile("sample3","psd"); | |
Integer channelsCount = 3; | |
String compressionMethod = "rle"; | |
Boolean fromScratch = false; | |
String outPath =""; | |
com.aspose.imaging.model.ResponseMessage apiResponse = imagingApi.PostImagePsd( | |
channelsCount, | |
compressionMethod, | |
fromScratch, | |
outPath, | |
inputFile | |
); | |
Utils.copyInputStreamToFile(apiResponse.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
String input = "Sample1.tiff"; | |
String output = "Sample2.tiff"; | |
File inputFile = Utils.stream2file("sample1","tiff", context.getResources().openRawResource(R.raw.sample1)); | |
File outputFile = Utils.createTempFile("sample3","tiff"); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
String compression = "ccittfax3"; | |
String resolutionUnit = "inch"; | |
Integer bitDepth = 1; | |
Boolean fromScratch = false; | |
Float horizontalResolution = 1096.0f; | |
Float verticalResolution = 1096.0f; | |
String outPath=""; | |
com.aspose.imaging.model.ResponseMessage apiResponse = | |
imagingApi.PostProcessTiff( | |
compression, | |
resolutionUnit, | |
bitDepth, | |
fromScratch, | |
horizontalResolution, | |
verticalResolution, | |
outPath, | |
inputFile | |
); | |
Utils.copyInputStreamToFile(apiResponse.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
String input = "Sample1.tiff"; | |
String output = "Sample2.tiff"; | |
File inputFile = Utils.stream2file("sample1","tiff", context.getResources().openRawResource(R.raw.sample1)); | |
File outputFile = Utils.createTempFile("sample3","tiff"); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
String compression = "ccittfax3"; | |
String resolutionUnit = "inch"; | |
Integer bitDepth = 1; | |
Boolean fromScratch = false; | |
Float horizontalResolution = 96.0f; | |
Float verticalResolution = 96.0f; | |
String outPath =""; | |
com.aspose.imaging.model.ResponseMessage apiResponse = imagingApi.PostProcessTiff ( | |
compression, | |
resolutionUnit, | |
bitDepth, | |
fromScratch, | |
horizontalResolution, | |
verticalResolution, | |
outPath, | |
inputFile | |
); | |
Utils.copyInputStreamToFile(apiResponse.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
File inputFile = Utils.stream2file("sample2","bmp", context.getResources().openRawResource(R.raw.sample2)); | |
File outputFile = Utils.createTempFile("sample3","jpg"); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
String format = "jpg"; | |
String outPath = ""; | |
com.aspose.imaging.model.ResponseMessage apiResponse | |
= imagingApi.PostImageSaveAs( | |
format, | |
outPath, | |
inputFile | |
); | |
Utils.copyInputStreamToFile(apiResponse.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
String input = "Sample1.tiff"; | |
String output = "Sample2.tif"; | |
File inputFile = Utils.stream2file("sample1","tiff", context.getResources().openRawResource(R.raw.sample1)); | |
File outputFile = Utils.createTempFile("sample3","tiff"); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
String outPath = ""; | |
com.aspose.imaging.model.ResponseMessage apiResponse | |
= imagingApi.GetTiffToFax( | |
input, | |
Utils.STORAGE, | |
Utils.FOLDER, | |
outPath | |
); | |
Utils.copyInputStreamToFile(apiResponse.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
String input = "Sample1.png"; | |
String output = "Sample2.jpg"; | |
File inputFile = Utils.stream2file("sample1","tiff", context.getResources().openRawResource(R.raw.sample1)); | |
File outputFile = Utils.createTempFile("sample10","jpg"); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
Integer x = 30; | |
Integer y = 40; | |
Integer width = 100; | |
Integer height = 100; | |
String format = "jpg"; | |
String outPath = ""; | |
storageApi.PutCreate( | |
input, | |
null, | |
Utils.STORAGE, | |
inputFile | |
); | |
com.aspose.imaging.model.ResponseMessage apiResponse | |
= imagingApi.GetCropImage( | |
input, | |
format, | |
x, | |
y, | |
width, | |
height, | |
outPath, | |
Utils.FOLDER, | |
Utils.STORAGE | |
); | |
Utils.copyInputStreamToFile(apiResponse.getInputStream(),outputFile); | |
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-tasks/Aspose.Tasks-for-Java | |
String input = "Sample1.tiff"; | |
String output = "Sample2.tiff"; | |
String appendWith="append.tiff"; | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
File inputFile = Utils.stream2file("sample1","tiff", context.getResources().openRawResource(R.raw.sample1)); | |
File outputFile = Utils.createTempFile("sample10","tiff"); | |
File appendWithFile = Utils.stream2file("sample2","tiff", context.getResources().openRawResource(R.raw.sample2)); | |
storageApi.PutCreate( | |
input, | |
null, | |
Utils.STORAGE, | |
inputFile | |
); | |
storageApi.PutCreate( | |
appendWith, | |
null, | |
Utils.STORAGE, | |
appendWithFile | |
); | |
imagingApi.PostTiffAppend( | |
input, | |
appendWith, | |
Utils.STORAGE, | |
Utils.FOLDER | |
); | |
com.aspose.storage.model.ResponseMessage sr | |
= storageApi.GetDownload( | |
input, | |
null, | |
Utils.STORAGE | |
); | |
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
File inputFile = Utils.stream2file("sample5","jpg", context.getResources().openRawResource(R.raw.sample5)); | |
File outputFile = Utils.createTempFile("sample3","jpg"); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
String format = "jpg"; | |
Integer newWidth = 200; | |
Integer newHeight = 200; | |
Integer x = 100; | |
Integer y = 100; | |
Integer rectWidth = 100; | |
Integer rectHeight = 100; | |
String rotateFlipMethod = "rotate90flipnone"; | |
String outPath = ""; | |
com.aspose.imaging.model.ResponseMessage apiResponse | |
=imagingApi.PostImageSaveAs( | |
format, | |
newWidth, | |
newHeight, | |
x, | |
y, | |
rectWidth, | |
rectHeight, | |
rotateFlipMethod, | |
outPath, | |
inputFile | |
); | |
Utils.copyInputStreamToFile(apiResponse.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
String input = "Sample1.png"; | |
String output = "Sample2.png"; | |
File inputFile = Utils.stream2file("sample5","jpg", context.getResources().openRawResource(R.raw.sample5)); | |
File outputFile = Utils.createTempFile("sample3","jpg"); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
Integer newWidth = 200; | |
Integer newHeight = 200; | |
String format = "jpg"; | |
String outPath = ""; | |
com.aspose.imaging.model.ResponseMessage apiResponse | |
= imagingApi.PostChangeImageScale( | |
format, | |
newWidth, | |
newHeight, | |
outPath, | |
inputFile | |
); | |
Utils.copyInputStreamToFile(apiResponse.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
File inputFile = Utils.stream2file("sample5","jpg", context.getResources().openRawResource(R.raw.sample5)); | |
File outputFile = Utils.createTempFile("sample3","png"); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
Integer newWidth = 200; | |
Integer newHeight = 200; | |
String format = "png"; | |
String outPath = ""; | |
com.aspose.imaging.model.ResponseMessage apiResponse | |
= imagingApi.PostChangeImageScale( | |
format, | |
newWidth, | |
newHeight, | |
outPath, | |
inputFile | |
); | |
Utils.copyInputStreamToFile(apiResponse.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
String input="sample5.jpg"; | |
File inputFile = Utils.stream2file("sample5","jpg", context.getResources().openRawResource(R.raw.sample5)); | |
File outputFile = Utils.createTempFile("sample3","png"); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
String format = "jpg"; | |
String method = "Rotate180FlipX"; | |
String outPath = ""; | |
storageApi.PutCreate( | |
input, | |
null, | |
Utils.STORAGE, | |
inputFile | |
); | |
com.aspose.imaging.model.ResponseMessage apiResponse | |
= imagingApi.GetImageRotateFlip( | |
input, | |
format, | |
method, | |
outPath, | |
Utils.FOLDER, | |
Utils.STORAGE | |
); | |
Utils.copyInputStreamToFile(apiResponse.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
File inputFile = Utils.stream2file("sample1","tiff", context.getResources().openRawResource(R.raw.sample1)); | |
File outputFile = Utils.createTempFile("sample2","tiff"); | |
Integer frameId = 0; | |
Integer newWidth = 200; | |
Integer newHeight = 200; | |
Integer x = 20; | |
Integer y = 20; | |
Integer rectWidth = 100; | |
Integer rectHeight = 100; | |
String rotateFlipMethod = ""; | |
Boolean saveOtherFrames = false; | |
String outPath = ""; | |
storageApi.PutCreate( | |
"sample1.tiff", | |
null, | |
Utils.STORAGE, | |
inputFile | |
); | |
com.aspose.imaging.model.ResponseMessage apiResponse | |
= imagingApi.GetImageFrame( | |
"sample1.tiff", | |
frameId, | |
newWidth, | |
newHeight, | |
x, | |
y, | |
rectWidth, | |
rectHeight, | |
rotateFlipMethod, | |
saveOtherFrames, | |
outPath, | |
Utils.FOLDER, | |
Utils.STORAGE | |
); | |
Utils.copyInputStreamToFile(apiResponse.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
String input = "Sample1.tiff"; | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
File inputFile = Utils.stream2file("sample1","tiff", context.getResources().openRawResource(R.raw.sample1)); | |
File outputFile = Utils.createTempFile("sample2","tiff"); | |
Integer frameId = 0; | |
Integer newWidth = 300; | |
Integer newHeight = 300; | |
Integer x = 100; | |
Integer y = 100; | |
Integer rectWidth = 200; | |
Integer rectHeight = 200; | |
String rotateFlipMethod = ""; | |
Boolean saveOtherFrames = false; | |
String outPath = ""; | |
storageApi.PutCreate( | |
input, | |
null, | |
Utils.STORAGE, | |
inputFile | |
); | |
com.aspose.imaging.model.ResponseMessage apiResponse | |
=imagingApi.GetImageFrame( | |
input, | |
frameId, | |
newWidth, | |
newHeight, | |
x, | |
y, | |
rectWidth, | |
rectHeight, | |
rotateFlipMethod, | |
saveOtherFrames, | |
outPath, | |
Utils.FOLDER, | |
Utils.STORAGE | |
); | |
Utils.copyInputStreamToFile(apiResponse.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
String input = "Sample1.tiff"; | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
File inputFile = Utils.stream2file("sample1","tiff", context.getResources().openRawResource(R.raw.sample1)); | |
Integer frameId = 0; | |
storageApi.PutCreate( | |
input, | |
null, | |
Utils.STORAGE, | |
inputFile | |
); | |
com.aspose.imaging.model.ImagingResponse apiResponse =imagingApi.GetImageFrameProperties( | |
input, | |
frameId, | |
Utils.FOLDER, | |
Utils.STORAGE | |
); | |
System.out.println(" Frame property Class "+apiResponse.getTiffProperties().getClass()); |
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-tasks/Aspose.Tasks-for-Java | |
String input = "Sample1.tiff"; | |
String output = "Sample2.tiff"; | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
File inputFile = Utils.stream2file("sample1","tiff", context.getResources().openRawResource(R.raw.sample1)); | |
File outputFile = Utils.createTempFile("sample2","tiff"); | |
Integer frameId = 0; | |
Integer newWidth = 0; | |
Integer newHeight = 0; | |
Integer x = 0; | |
Integer y = 0; | |
Integer rectWidth = 0; | |
Integer rectHeight = 0; | |
String rotateFlipMethod = "rotate90flipnone"; | |
Boolean saveOtherFrames = false; | |
String outPath = ""; | |
storageApi.PutCreate( | |
input, | |
null, | |
Utils.STORAGE, | |
inputFile | |
); | |
com.aspose.imaging.model.ResponseMessage apiResponse | |
= imagingApi.GetImageFrame( | |
input, | |
frameId, | |
newWidth, | |
newHeight, | |
x, | |
y, | |
rectWidth, | |
rectHeight, | |
rotateFlipMethod, | |
saveOtherFrames, | |
outPath, | |
Utils.FOLDER, | |
Utils.STORAGE | |
); | |
Utils.copyInputStreamToFile(apiResponse.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
String input = "Sample1.tiff"; | |
String output = "Sample2.tiff"; | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
File inputFile = Utils.stream2file("sample1","tiff", context.getResources().openRawResource(R.raw.sample1)); | |
File outputFile = Utils.createTempFile("sample2","tiff"); | |
Integer frameId = 0; | |
Integer newWidth = 300; | |
Integer newHeight = 300; | |
Integer x = 96; | |
Integer y = 96; | |
Integer rectWidth = 200; | |
Integer rectHeight = 200; | |
String rotateFlipMethod = ""; | |
Boolean saveOtherFrames = false; | |
String outPath = ""; | |
storageApi.PutCreate( | |
input, | |
null, | |
Utils.STORAGE, | |
inputFile | |
); | |
com.aspose.imaging.model.ResponseMessage apiResponse | |
= imagingApi.GetImageFrame( | |
input, | |
frameId, | |
newWidth, | |
newHeight, | |
x, | |
y, | |
rectWidth, | |
rectHeight, | |
rotateFlipMethod, | |
saveOtherFrames, | |
outPath, | |
Utils.FOLDER, | |
Utils.STORAGE | |
); | |
Utils.copyInputStreamToFile(apiResponse.getInputStream(),outputFile); |
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-tasks/Aspose.Tasks-for-Java | |
String input = "Sample1.tiff"; | |
String output = "Sample2.tiff"; | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
ImagingApi imagingApi = new ImagingApi(Configuration.apiKey, Configuration.appSID, true); | |
File inputFile = Utils.stream2file("sample1","tiff", context.getResources().openRawResource(R.raw.sample1)); | |
File outputFile = Utils.createTempFile("sample2","tiff"); | |
Integer frameId = 0; | |
Integer newWidth = 0; | |
Integer newHeight = 0; | |
Integer x = 0; | |
Integer y = 0; | |
Integer rectWidth = 0; | |
Integer rectHeight = 0; | |
String rotateFlipMethod = "rotate90flipnone"; | |
Boolean saveOtherFrames = false; | |
String outPath = ""; | |
storageApi.PutCreate( | |
input, | |
null, | |
Utils.STORAGE, | |
inputFile | |
); | |
com.aspose.imaging.model.ResponseMessage apiResponse | |
=imagingApi.GetImageFrame( | |
input, | |
frameId, | |
newWidth, | |
newHeight, | |
x, | |
y, | |
rectWidth, | |
rectHeight, | |
rotateFlipMethod, | |
saveOtherFrames, | |
outPath, | |
Utils.FOLDER, | |
Utils.STORAGE | |
); | |
Utils.copyInputStreamToFile(apiResponse.getInputStream(),outputFile); |
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
sample |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment