Skip to content

Instantly share code, notes, and snippets.

@aspose-imaging
Last active March 26, 2017 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-imaging/838117e758ae02ef86a63fb3f3b0fbaf to your computer and use it in GitHub Desktop.
Save aspose-imaging/838117e758ae02ef86a63fb3f3b0fbaf to your computer and use it in GitHub Desktop.
Aspose.Imaging-for-Cloud-for-Objective-C
The GIST contains Objective C code snippets for examples of Aspose.Imaging for Cloud.
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSString *fileName = @"sample.bmp";
[Utils uploadFile:fileName];
[self.imagingApi getImageBmpWithCompletionBlock:fileName
bitsPerPixel:[NSNumber numberWithInt:24]
horizontalResolution:[NSNumber numberWithInt:300]
verticalResolution:[NSNumber numberWithInt:300]
fromScratch:nil
outPath:@"updated.bmp"
folder:nil
storage:nil
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSURL *pathToFile = [[NSBundle mainBundle] URLForResource:@"sample" withExtension:@"bmp"];
[self.imagingApi postImageBmpWithCompletionBlock:[NSNumber numberWithInt:24]
horizontalResolution:[NSNumber numberWithInt:300]
verticalResolution:[NSNumber numberWithInt:300]
file:pathToFile
fromScratch:[NSNumber numberWithBool:NO]
outPath:nil
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSString *fileName = @"sample.gif";
[Utils uploadFile:fileName];
[self.imagingApi getImageGifWithCompletionBlock:fileName
backgroundColorIndex:@"255"
colorResolution:@"7"
hasTrailer:[NSNumber numberWithBool:YES]
interlaced:[NSNumber numberWithBool:YES]
isPaletteSorted:[NSNumber numberWithBool:YES]
pixelAspectRatio:@"10"
fromScratch:[NSNumber numberWithBool:YES]
outPath:@"updated.gif"
folder:nil
storage:nil
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSURL *pathToFile = [[NSBundle mainBundle] URLForResource:@"sample" withExtension:@"gif"];
[self.imagingApi postImageGifWithCompletionBlock:pathToFile
backgroundColorIndex:@"255"
colorResolution:@"7"
hasTrailer:[NSNumber numberWithBool:YES]
interlaced:[NSNumber numberWithBool:YES]
isPaletteSorted:[NSNumber numberWithBool:YES]
pixelAspectRatio:@"10"
fromScratch:[NSNumber numberWithBool:NO]
outPath:nil
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSString *fileName = @"demo.tif";
[Utils uploadFile:fileName];
[self.imagingApi getImagePropertiesWithCompletionBlock:fileName
folder:nil
storage:nil
completionHandler:^(ASPImagingResponse *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSString *fileName = @"aspose.jpg";
[Utils uploadFile:fileName];
[self.imagingApi getImageJpgWithCompletionBlock:fileName
quality:[NSNumber numberWithInt:100]
compressionType:@"progressive"
fromScratch:[NSNumber numberWithBool:NO]
outPath:@"updated.jpg"
folder:nil
storage:nil
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSURL *pathToFile = [[NSBundle mainBundle] URLForResource:@"aspose" withExtension:@"jpg"];
[self.imagingApi postImageJpgWithCompletionBlock:pathToFile
quality:[NSNumber numberWithInt:100]
compressionType:@"progressive"
fromScratch:nil
outPath:@"update-barcodeQR.jpg"
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSString *fileName = @"aspose_imaging_for_cloud.png";
[Utils uploadFile:fileName];
[self.imagingApi getImagePngWithCompletionBlock:fileName
fromScratch:[NSNumber numberWithBool:YES]
outPath:@"updated.png"
folder:nil
storage:nil
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSURL *pathToFile = [[NSBundle mainBundle] URLForResource:@"aspose_imaging_for_cloud" withExtension:@"png"];
[self.imagingApi postImagePngWithCompletionBlock:pathToFile
fromScratch:[NSNumber numberWithBool:YES]
outPath:@"update-barcodeQR.png"
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSString *fileName = @"sample.psd";
[Utils uploadFile:fileName];
[self.imagingApi getImagePsdWithCompletionBlock:fileName
channelsCount:[NSNumber numberWithInt:3]
compressionMethod:@"rle"
fromScratch:[NSNumber numberWithBool:NO]
outPath:@"updated.psd"
folder:nil
storage:nil
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSURL *pathToFile = [[NSBundle mainBundle] URLForResource:@"sample" withExtension:@"psd"];
[self.imagingApi postImagePsdWithCompletionBlock:pathToFile
channelsCount:[NSNumber numberWithInt:3]
compressionMethod:@"rle"
fromScratch:nil
outPath:@"update-bizcard.psd"
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSURL *pathToFile = [[NSBundle mainBundle] URLForResource:@"demo" withExtension:@"tif"];
[self.imagingApi postProcessTiffWithCompletionBlock:pathToFile
compression:@"ccittfax3"
resolutionUnit:@"inch"
bitDepth:[NSNumber numberWithInt:1]
fromScratch:[NSNumber numberWithBool:NO]
horizontalResolution:[NSNumber numberWithFloat:96.0]
verticalResolution:[NSNumber numberWithFloat:96.0]
outPath:nil
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSString *fileName = @"aspose.jpg";
[Utils uploadFile:fileName];
[self.imagingApi getCropImageWithCompletionBlock:fileName
format:@"jpg"
x:[NSNumber numberWithInt:30]
y:[NSNumber numberWithInt:40]
width:[NSNumber numberWithInt:100]
height:[NSNumber numberWithInt:100]
outPath:nil
folder:nil
storage:nil
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSString *fileName = @"aspose.jpg";
[Utils uploadFile:fileName];
[self.imagingApi getImageRotateFlipWithCompletionBlock:fileName
format:@"png"
method:@"Rotate180FlipX"
outPath:@"rotateflip.png"
folder:nil
storage:nil
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSString *fileName = @"TestDemo.tif";
[Utils uploadFile:fileName];
[self.imagingApi getTiffToFaxWithCompletionBlock:fileName
storage:nil
folder:nil
outPath:@"Fax.tiff"
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSURL *pathToFile = [[NSBundle mainBundle] URLForResource:@"aspose" withExtension:@"jpg"];
[self.imagingApi postImageSaveAs_2WithCompletionBlock:@"jpg"
newWidth:[NSNumber numberWithInt:200]
newHeight:[NSNumber numberWithInt:200]
x:[NSNumber numberWithInt:100]
y:[NSNumber numberWithInt:100]
rectWidth:[NSNumber numberWithInt:100]
rectHeight:[NSNumber numberWithInt:100]
rotateFlipMethod:@"rotate90flipnone"
file:pathToFile
outPath:nil
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSURL *pathToFile = [[NSBundle mainBundle] URLForResource:@"aspose_imaging_for_cloud" withExtension:@"png"];
[self.imagingApi postChangeImageScaleWithCompletionBlock:@"png"
newWidth:[NSNumber numberWithInt:200]
newHeight:[NSNumber numberWithInt:200]
file:pathToFile
outPath:nil
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSURL *pathToFile = [[NSBundle mainBundle] URLForResource:@"aspose" withExtension:@"jpg"];
[self.imagingApi postImageSaveAsWithCompletionBlock:@"png"
file:pathToFile
outPath:nil
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSString *fileName = @"sample.tif";
[Utils uploadFile:fileName];
NSString *appendFile = @"TestDemo.tif";
[Utils uploadFile:appendFile];
[self.imagingApi postTiffAppendWithCompletionBlock:fileName
appendFile:appendFile
storage:nil
folder:nil
completionHandler:^(ASPBaseResponse *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSURL *pathToFile = [[NSBundle mainBundle] URLForResource:@"aspose_imaging_for_cloud" withExtension:@"png"];
[self.imagingApi postChangeImageScaleWithCompletionBlock:@"jpg"
newWidth:[NSNumber numberWithInt:200]
newHeight:[NSNumber numberWithInt:200]
file:pathToFile
outPath:nil
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSString *fileName = @"TestDemo.tif";
[Utils uploadFile:fileName];
[self.imagingApi getImageFrameWithCompletionBlock:fileName
frameId:[NSNumber numberWithInt:0]
newWidth:[NSNumber numberWithInt:200]
newHeight:[NSNumber numberWithInt:200]
x:[NSNumber numberWithInt:20]
y:[NSNumber numberWithInt:20]
rectWidth:[NSNumber numberWithInt:100]
rectHeight:[NSNumber numberWithInt:100]
rotateFlipMethod:nil
saveOtherFrames:[NSNumber numberWithBool:NO]
outPath:nil
folder:nil
storage:nil
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSString *fileName = @"sample-multi.tif";
[Utils uploadFile:fileName];
[self.imagingApi getImageFrameWithCompletionBlock:fileName
frameId:[NSNumber numberWithInt:1]
newWidth:nil
newHeight:nil
x:nil
y:nil
rectWidth:nil
rectHeight:nil
rotateFlipMethod:nil
saveOtherFrames:nil
outPath:@"frame.tiff"
folder:nil
storage:nil
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSString *fileName = @"sample-multi.tif";
[Utils uploadFile:fileName];
[self.imagingApi getImageFramePropertiesWithCompletionBlock:fileName
frameId:[NSNumber numberWithInt:1]
folder:nil
storage:nil
completionHandler:^(ASPImagingResponse *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSString *fileName = @"sample-multi.tif";
[Utils uploadFile:fileName];
[self.imagingApi getImageFrameWithCompletionBlock:fileName
frameId:[NSNumber numberWithInt:1]
newWidth:[NSNumber numberWithInt:0]
newHeight:[NSNumber numberWithInt:0]
x:[NSNumber numberWithInt:0]
y:[NSNumber numberWithInt:0]
rectWidth:[NSNumber numberWithInt:0]
rectHeight:[NSNumber numberWithInt:0]
rotateFlipMethod:@"rotate90flipnone"
saveOtherFrames:[NSNumber numberWithBool:NO]
outPath:nil
folder:nil
storage:nil
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSString *fileName = @"sample-multi.tif";
[Utils uploadFile:fileName];
[self.imagingApi getImageFrameWithCompletionBlock:fileName
frameId:[NSNumber numberWithInt:1]
newWidth:[NSNumber numberWithInt:300]
newHeight:[NSNumber numberWithInt:300]
x:[NSNumber numberWithInt:100]
y:[NSNumber numberWithInt:100]
rectWidth:[NSNumber numberWithInt:200]
rectHeight:[NSNumber numberWithInt:200]
rotateFlipMethod:nil
saveOtherFrames:[NSNumber numberWithBool:NO]
outPath:@""
folder:nil
storage:nil
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
# For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-Cloud
//Get App key and App SID from https://cloud.aspose.com
[Utils setAppKeyAndAppSID];
ASPImagingApi *imagingApi = [[ASPImagingApi alloc] init];
NSString *fileName = @"TestDemo.tif";
[Utils uploadFile:fileName];
[self.imagingApi getImageFrameWithCompletionBlock:fileName
frameId:[NSNumber numberWithInt:0]
newWidth:[NSNumber numberWithInt:0]
newHeight:[NSNumber numberWithInt:0]
x:[NSNumber numberWithInt:0]
y:[NSNumber numberWithInt:0]
rectWidth:[NSNumber numberWithInt:0]
rectHeight:[NSNumber numberWithInt:0]
rotateFlipMethod:@"rotate90flipnone"
saveOtherFrames:[NSNumber numberWithBool:NO]
outPath:nil
folder:nil
storage:nil
completionHandler:^(NSURL *output, NSError *error) {
NSLog(@"%@", output);
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment