The Image Processor service is an image utility service on the cloud that enables developers to perform various image operations on the uploaded images such as resize, scale, thumbnail, crop etc. This module is very useful for mobile Apps where images need not to be stored locally and processor intensive operations are to be performed. It is also useful for web applications that need to perform complex image operations.

Initialize

In order to use various functions available in a specific API, a developer has to create an instance of ServiceAPI by passing the apiKey and secretKey which will be created after the app creation from AppHQ dashboard.

Required Parameters

apiKey - The Application key given when the application was created. secretKey - The secret key corresponding to the application key given when the application was created.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");
ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");
ServiceAPI *api = [[ServiceAPI alloc]init];
api.apiKey = @"<API_KEY>";
api.secretKey = @"<SECRET_KEY>"; 
ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");
ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");
Coming Soon
Not Availabe
ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");
$api = new ServiceAPI("API_KEY","SECRET_KEY"); 
Coming Soon
api = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>") 
Coming Soon 
Coming Soon

Build Service

After initialization, developer needs to call the buildXXXService method on ServiceAPI instance to get the instance of the particular API that you wish to build. For example, To build an instance of ImageProcessorService, buildImageProcessorService() method needs to be called.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
ImageProcessorService imageProcessorService = api.buildImageProcessorService(); 
ImageProcessorService imageProcessorService = api.BuildImageProcessorService();  
ImageProcessorService *imageProcessorService = [api buildImageProcessorService]; 
ImageProcessorService imageProcessorService = api.buildImageProcessorService(); 
ImageProcessorService imageProcessorService = api.buildImageProcessorService(); 
Coming Soon
Not Availabe
ImageProcessorService imageProcessorService = api.BuildImageProcessorService(); 
$imageProcessorService = $api->buildImageProcessorService(); 
Coming Soon
image_processor_service = api.build_image_processor_service() 
Coming Soon 
Coming Soon

Import Statement

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
 
import com.shephertz.app42.paas.sdk.android.ServiceAPI;
import com.shephertz.app42.paas.sdk.android.App42Response;
import com.shephertz.app42.paas.sdk.android.App42Exception;
import com.shephertz.app42.paas.sdk.android.App42BadParameterException;
import com.shephertz.app42.paas.sdk.android.App42NotFoundException;
import com.shephertz.app42.paas.sdk.android.imageProcessor.Image;
import com.shephertz.app42.paas.sdk.android.imageProcessor.ImageProcessorService;
using com.shephertz.app42.paas.sdk.windows;  
using com.shephertz.app42.paas.sdk.windows.imageProcessor;   
#import "Shephertz_App42_iOS_API/Shephertz_App42_iOS_API.h"   
import com.shephertz.app42.paas.sdk.jme.ServiceAPI;
import com.shephertz.app42.paas.sdk.jme.App42Response;
import com.shephertz.app42.paas.sdk.jme.App42Exception;
import com.shephertz.app42.paas.sdk.jme.App42BadParameterException;
import com.shephertz.app42.paas.sdk.jme.App42NotFoundException;
import com.shephertz.app42.paas.sdk.jme.imageProcessor.Image;
import com.shephertz.app42.paas.sdk.jme.imageProcessor.ImageProcessorService;
import com.shephertz.app42.paas.sdk.java.ServiceAPI;
import com.shephertz.app42.paas.sdk.java.App42Response;
import com.shephertz.app42.paas.sdk.java.App42Exception;
import com.shephertz.app42.paas.sdk.java.App42BadParameterException;
import com.shephertz.app42.paas.sdk.java.App42NotFoundException;
import com.shephertz.app42.paas.sdk.java.imageProcessor.Image;
import com.shephertz.app42.paas.sdk.java.imageProcessor.ImageProcessorService;
Coming Soon
Not Available
using com.shephertz.app42.paas.sdk.csharp;  
using com.shephertz.app42.paas.sdk.csharp.imageProcessor;  
use com\shephertz\app42\paas\sdk\php\App42Response;  
use com\shephertz\app42\paas\sdk\php\App42Exception;  
use com\shephertz\app42\paas\sdk\php\App42BadParameterException;  
use com\shephertz\app42\paas\sdk\php\App42NotFoundException;  
use com\shephertz\app42\paas\sdk\php\imageProcessor\ImageProcessorService;  
use com\shephertz\app42\paas\sdk\php\ServiceAPI;  
include_once '../ImageProcessorService.php';  
include_once '../ServiceAPI.php';   
include_once '../App42Response.php';  
include_once '../App42Exception.php';   
include_once '../App42BadParameterException.php';  
include_once '../App42NotFoundException.php';  
Coming Soon
require 'App42_Ruby_API'
Coming Soon 
Coming Soon

Resize

Resize image. Returns the original image url and converted image url. Images are stored in the cloud and can be accessed through the urls Resizing is done based on the width and height provided.

Required Parameters

imageName - Name of the image to resize. imagePath - Path of the local file to resize. width - Width of the image to resize. height - Height of the image to resize.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String imageName = "imageName";
String imagePath = "Your File Path";
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.resize(imageName,imagePath,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Not Available
NSString *name = @"imageName";
NSString *imagePath = @"Your File Path";
int width = 234;
int height = 1000;	
Image *image = [imageProcesorService resize:name imagePath:imagePath width:width height:height];   
NSLog(@"imageName is = %@",image.name);
NSLog(@"convertedImage is = %@",image.convertedImage);
NSString *jsonResponse = [image toString];
Not Available
String imageName = "imageName";
String imagePath = "Your File Path";
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.resize(imageName,imagePath,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Coming Soon
Not Available
String imageName = "imageName";
String imagePath = "Your File Path";
int width = 234;
int height = 1000;
Image image = imageProcessorService.Resize(imageName,imagePath,width,height);
Console.WriteLine("imageName is " + image.GetName()); 
Console.WriteLine("convertedImage is " + image.GetConvertedImage()); 
String jsonResponse = image.ToString();
$imageName = "imageName";
$imagePath = "Your File Path";
$width = 234;
$height = 1000;
$image = $imageProcessorService->resize($imageName,$imagePath,$width,$height);
print_r("imageName is " . $image->getName());
print_r("convertedImage is " . $image->getConvertedImage());
$jsonResponse = $image->toString(); 
Coming Soon
image_name = "Resize01';
image_path = "Local file path";
width = "234";
height = "1000";
image = image_processor_service.resize(image_name, image_path, width, height);  
puts "imageName is #{image.image_name}";
puts "originalImage is #{image.original_image}";
puts "convertedImage is #{image.converted_image}";
puts "width is #{image.width}";
puts "height is #{image.height}";
json_response = image.to_s();
Coming Soon 
Coming Soon 

Thumbnail

Creates a thumbnail of the image. There is a difference between thumbnail and resize The thumbnail operation is optimized for speed, it removes information of the image which is not necessary for a thumbnail e.g hearder information. Returns the original image url and converted image url. Images are stored on the cloud and can be accessed through the urls Resizing is done based on the width and height provided.

Required Parameters

imageName - Name of the image file for which thumbnail has to be created. imagePath - Path of the local file whose thumbnail has to be created. width - Width of the image for thumbnail. height - Height of the image for thumbnail.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String imageName = "imageName";
String imagePath = "Your File Path";
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.thumbnail(imageName,imagePath,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Not Available
NSString *name = @"imageName";
NSString *imagePath = @"Your File Path";
int width = 234;
int height = 1000;	
Image *image = [imageProcesorService thumbnail:name imagePath:imagePath width:width height:height];   
NSLog(@"imageName is = %@",image.name);
NSLog(@"convertedImage is = %@",image.convertedImage);
NSString *jsonResponse = [image toString];
Not Available
String imageName = "imageName";
String imagePath = "Your File Path";
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.thumbnail(imageName,imagePath,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Coming Soon
Not Available
String imageName = "imageName";
String imagePath = "Your File Path";
int width = 234;
int height = 1000;
Image image = imageProcessorService.Thumbnail(imageName,imagePath,width,height);
Console.WriteLine("imageName is " + image.GetName()); 
Console.WriteLine("convertedImage is " + image.GetConvertedImage()); 
String jsonResponse = image.ToString();
$imageName = "imageName";
$imagePath = "Your File Path";
$width = 234;
$height = 1000;
$image = $imageProcessorService->thumbnail($imageName,$imagePath,$width,$height);
print_r("imageName is " . $image->getName());
print_r("convertedImage is " . $image->getConvertedImage());
$jsonResponse = $image->toString(); 
Coming Soon
name = "Thumbnail1";
image_path = "Local file path";
width = "234";
height = "1000";					
image = image_processor_service.thumbnail(name, image_path, width, height); 
puts "imageName is #{image.name}";
puts "originalImage is #{image.original_image}";
puts "convertedImage is #{image.converted_image}";
puts "width is #{image.width}";
puts "height is #{image.height}";			
json_response = image.to_s();
Coming Soon 
Coming Soon 

Scale

Scales the image based on width and height. Returns the original image url and converted image url. Images are stored in the cloud and can be accessed through the urls Resizing is done based on the width and height provided

Required Parameters

imageName - Name of the image to scale. imagePath - Path of the local file to scale. width - Width of the image to scale. height - Height of the image to scale.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String imageName = "imageName";
String imagePath = "Your File Path";
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.scale(imageName,imagePath,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Not Available
NSString *name = @"imageName";
NSString *imagePath = @"Your File Path";
int width = 234;
int height = 1000;	
Image *image = [imageProcesorService scale:name imagePath:imagePath width:width height:height];   
NSLog(@"imageName is = %@",image.name);
NSLog(@"convertedImage is = %@",image.convertedImage);
NSString *jsonResponse = [image toString];
Not Available
String imageName = "imageName";
String imagePath = "Your File Path";
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.scale(imageName,imagePath,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Coming Soon
Not Available
String imageName = "imageName";
String imagePath = "Your File Path";
int width = 234;
int height = 1000;
Image image = imageProcessorService.Scale(imageName,imagePath,width,height);
Console.WriteLine("imageName is " + image.GetName()); 
Console.WriteLine("convertedImage is " + image.GetConvertedImage()); 
String jsonResponse = image.ToString();
$imageName = "imageName";
$imagePath = "Your File Path";
$width = 234;
$height = 1000;
$image = $imageProcessorService->scale($imageName,$imagePath,$width,$height);
print_r("imageName is " . $image->getName());
print_r("convertedImage is " . $image->getConvertedImage());
$jsonResponse = $image->toString(); 
Coming Soon
name = "Scale01";
image_path = "Local file path";
width = "234";
height = "1000";						
image = image_processor_service.scale(name, image_path, width, height); 
puts "imageName is #{image.name}";
puts "originalImage is #{image.original_image}";
puts "convertedImage is #{image.converted_image}";
puts "width is #{image.width}";
puts "height is #{image.height}";		
json_response = image.to_s();
Coming Soon 
Coming Soon 

Crop

Crops image based on width, height and x, y coordinates. Returns the original image url and converted image url. Images are stored in the cloud and can be accessed through the urls Resizing is done based on the width and height provided

Required Parameters

imageName - Name of the image to crop. imagePath - Path of the local file to crop. width - Width of the image to crop. height - Height of the image to crop.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String imageName = "imageName";
String imagePath = "Your File Path";
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.crop(imageName,imagePath,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Not Available
NSString *name = @"imageName";
NSString *imagePath = @"Your File Path";
int width = 234;
int height = 1000;	
Image *image = [imageProcesorService crop:name imagePath:imagePath width:width height:height];   
NSLog(@"imageName is = %@",image.name);
NSLog(@"convertedImage is = %@",image.convertedImage);
NSString *jsonResponse = [image toString];
Not Available
String imageName = "imageName";
String imagePath = "Your File Path";
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.crop(imageName,imagePath,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Coming Soon
Not Available
String imageName = "imageName";
String imagePath = "Your File Path";
int width = 234;
int height = 1000;
Image image = imageProcessorService.Crop(imageName,imagePath,width,height);
Console.WriteLine("imageName is " + image.GetName()); 
Console.WriteLine("convertedImage is " + image.GetConvertedImage()); 
String jsonResponse = image.ToString();
$imageName = "imageName";
$imagePath = "Your File Path";
$width = 234;
$height = 1000;
$image = $imageProcessorService->crop($imageName,$imagePath,$width,$height);
print_r("imageName is " . $image->getName());
print_r("convertedImage is " . $image->getConvertedImage());
$jsonResponse = $image->toString(); 
Coming Soon
name = "Crop";
image_path = "Local file path";
width = "234";
height = "1000";
x = "34" ;
y = "32" ;						
image = image_processor_service.crop(name, image_path, width, height, x, y);  
puts "imageName is #{image.name}";
puts "originalImage is #{image.original_image}";
puts "convertedImage is #{image.converted_image}";
puts "width is #{image.width}";
puts "height is #{image.height}";			
json_response = image.to_s();
Coming Soon 
Coming Soon 

Convert Format

Converts the format of the image. Returns the original image url and converted image url. Images are stored on the cloud and can be accessed through the urls Conversion is done based on the formatToConvert provided

Required Parameters

imageName - Name of the image to resize. imagePath - Path of the local file to resize. convertFormat - Format in which you need to convert the file.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String imageName = "imageName";
String imagePath = "Your File Path";
String convertFormat = "File Format";
Image image = imageProcessorService.convertFormat(imageName,imagePath,convertFormat);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Not Available
Coming Soon
Not Available
String imageName = "imageName";
String imagePath = "Your File Path";
String convertFormat = "File Format";
Image image = imageProcessorService.convertFormat(imageName,imagePath,convertFormat);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Coming Soon
Not Available
String imageName = "imageName";
String imagePath = "Your File Path";
String convertFormat = "File Format";
Image image = imageProcessorService.ConvertFormat(imageName,imagePath,convertFormat);
Console.WriteLine("imageName is " + image.GetName()); 
Console.WriteLine("convertedImage is " + image.GetConvertedImage()); 
String jsonResponse = image.ToString();
$imageName = "imageName";
$imagePath = "Your File Path";
$convertFormat = "File Format";
$image = $imageProcessorService->convertFormat($imageName,$imagePath,$convertFormat);
print_r("imageName is " . $image->getName());
print_r("convertedImage is " . $image->getConvertedImage());
$jsonResponse = $image->toString(); 
Coming Soon
name = "Convert";
image_path = "Local file path";
format_to_convert = "Format of file to be convert";						
image = image_processor_service.convert_format(name, image_path, format_to_convert);
puts "imageName is #{image.name}";
puts "originalImage is #{image.original_image}";
puts "convertedImage is #{image.converted_image}";
json_response = image.to_string();
Coming Soon 
Coming Soon 

Resize By Percentage

Resize image by Percentage. Returns the original image url and converted image url. Images are stored in the cloud and can be accessed through the urls Resizing is done based on the width and height provided

Required Parameters

imageName - Name of the image to resize. imagePath - Path of the local file to resize. percentage - Percentage to which image has to be resized.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String imageName = "imageName";
String imagePath = "Your File Path";
Double percentage = 100;
Image image = imageProcessorService.resizeByPercentage(imageName,imagePath,percentage);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Not Available
NSString *imageName = @"imageName";
NSString *imagePath = @"Your File Path";
double percentage = 100;
Image *image = [imageProcesorService resizeByPercentage:name imagePath:imagePath percentage:percentage];   
NSLog(@"imageName is = %@",image.name);
NSLog(@"convertedImage is = %@",image.convertedImage);
NSString *jsonResponse = [image toString];
Not Available
String imageName = "imageName";
String imagePath = "Your File Path";
Double percentage = 100;
Image image = imageProcessorService.resizeByPercentage(imageName,imagePath,percentage);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Coming Soon
Not Available
String imageName = "imageName";
String imagePath = "Your File Path";
Double percentage = 100;
Image image = imageProcessorService.ResizeByPercentage(imageName,imagePath,percentage);
Console.WriteLine("imageName is " + image.GetName()); 
Console.WriteLine("convertedImage is " + image.GetConvertedImage()); 
String jsonResponse = image.ToString();
$imageName = "imageName";
$imagePath = "Your File Path";
$percentage = 100;
$image = $imageProcessorService->resizeByPercentage($imageName,$imagePath,$percentage);
print_r("imageName is " . $image->getName());
print_r("convertedImage is " . $image->getConvertedImage());
$jsonResponse = $image->toString(); 
Coming Soon
name = "ResizeByPercentage02";
image_path = "Local file path";
percentage = "100";						
image = image_processor_service.resize_by_percentage(name, image_path, percentage); 
puts "imageName is #{image.name}";
puts "originalImage is #{image.original_image}";
puts "convertedImage is #{image.converted_image}";
puts "width is #{image.width}";
puts "height is #{image.height}";
json_response = image.to_s();
Coming Soon 
Coming Soon 

Thumbnail By Percentage

Creates a thumbnail of the image by Percentage. There is a difference between thumbnail and resize. The thumbnail operation is optimized for speed removes information of the image which is not necessary for a thumbnail to reduce size e.g header information. Returns the original image url and converted image url. Images are stored in the cloud and can be accessed through the urls. Resizing is done based on the width and height provided.

Required Parameters

imageName - Name of the image file for which thumbnail has to be created. imagePath - Path of the local file whose thumbnail has to be created. percentage - Percentage for thumbnail.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String imageName = "imageName";
String imagePath = "Your File Path";
Double percentage = 100;
Image image = imageProcessorService.thumbnailByPercentage(imageName,imagePath,percentage);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Not Available
NSString *imageName = @"imageName";
NSString *imagePath = @"Your File Path";
double percentage = 100;
Image *image = [imageProcesorService thumbnailByPercentage:name imagePath:imagePath percentage:percentage];   
NSLog(@"imageName is = %@",image.name);
NSLog(@"convertedImage is = %@",image.convertedImage);
NSString *jsonResponse = [image toString];
Not Available
String imageName = "imageName";
String imagePath = "Your File Path";
Double percentage = 100;
Image image = imageProcessorService.thumbnailByPercentage(imageName,imagePath,percentage);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Coming Soon
Not Available
String imageName = "imageName";
String imagePath = "Your File Path";
Double percentage = 100;
Image image = imageProcessorService.ThumbnailByPercentage(imageName,imagePath,percentage);
Console.WriteLine("imageName is " + image.GetName()); 
Console.WriteLine("convertedImage is " + image.GetConvertedImage()); 
String jsonResponse = image.ToString();
$imageName = "imageName";
$imagePath = "Your File Path";
$percentage = 100;
$image = $imageProcessorService->thumbnailByPercentage($imageName,$imagePath,$percentage);
print_r("imageName is " . $image->getName());
print_r("convertedImage is " . $image->getConvertedImage());
$jsonResponse = $image->toString(); 
Coming Soon
name = "ThumbnailByPercentage";
image_path = "Local file path";
percentage = "100";					
image = image_processor_service.thumbnail_by_percentage(name, image_path, percentage); 
puts "imageName is #{image.name}";
puts "originalImage is #{image.original_image}";
puts "convertedImage is #{image.converted_image}";
puts "percentage is #{image.percentage}";
json_response = image.to_s();
Coming Soon 
Coming Soon 

Scale By Percentage

Scales the image by Percentage. Returns the original image url and converted image url. Images are stored in the cloud and can be accessed through the urls Resizing is done based on the width and height provided.

Required Parameters

imageName - Name of the image file to scale. imagePath - Path of the local file to scale. percentage - Percentage to which image has to be scaled.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String imageName = "imageName";
String imagePath = "Your File Path";
Double percentage = 100;
Image image = imageProcessorService.scaleByPercentage(imageName,imagePath,percentage);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Not Available
NSString *imageName = @"imageName";
NSString *imagePath = @"Your File Path";
double percentage = 100;
Image *image = [imageProcesorService scaleByPercentage:name imagePath:imagePath percentage:percentage];   
NSLog(@"imageName is = %@",image.name);
NSLog(@"convertedImage is = %@",image.convertedImage);
NSString *jsonResponse = [image toString];
Not Available
String imageName = "imageName";
String imagePath = "Your File Path";
Double percentage = 100;
Image image = imageProcessorService.scaleByPercentage(imageName,imagePath,percentage);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Coming Soon
Not Available
String imageName = "imageName";
String imagePath = "Your File Path";
Double percentage = 100;
Image image = imageProcessorService.ScaleByPercentage(imageName,imagePath,percentage);
Console.WriteLine("imageName is " + image.GetName()); 
Console.WriteLine("convertedImage is " + image.GetConvertedImage()); 
String jsonResponse = image.ToString();
$imageName = "imageName";
$imagePath = "Your File Path";
$percentage = 100;
$image = $imageProcessorService->scaleByPercentage($imageName,$imagePath,$percentage);
print_r("imageName is " . $image->getName());
print_r("convertedImage is " . $image->getConvertedImage());
$jsonResponse = $image->toString(); 
Coming Soon
Coming Soon
Coming Soon 
name = "ScaleByPercentage";
image_path = "Local file path";
percentage = "100";						
image = image_processor_service.scale_by_percentage(name, image_path, percentage); 
puts "imageName is #{image.name}";
puts "originalImage is #{image.original_image}";
puts "convertedImage is #{image.converted_image}";
puts "percentage is #{image.percentage}";			
json_response = image.to_s();

Resize With Inputstream

Required Parameters

imageName - Name of the image to resize. inputStream - InputStream of the local file to resize. width - Width of the image to resize. height - Height of the image to resize.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.resize(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
public class Callback : App42Callback  
{  
String imageName = "imageName.ext";
Stream inputStream = null; /* Get input stream from your source */
int width = 234;
int height = 1000;
uploadService.Resize(imageName,inputStream,width,height,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Image image = (Image) response;     
		String jsonResponse = image.ToString();  
	}  
} 
NSString *imageName = @"imageName.ext";
NSString *imagePath = @"Your File Path";
int width = 234;	
int height = 1000;	
NSData *imageData = [NSData dataWithContentsOfFile:[NSURL fileURLWithPath:imagePath]];
ImageProcesor *image = [imageProcesorService resize:imageName imageData:imageData width:width height:height];   
NSLog(@"imageName is = %@",image.name);
NSLog(@"convertedImage is = %@",image.convertedImage);
NSString *jsonResponse = [image toString];
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.resize(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.resize(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Coming Soon
Not Available
String imageName = "imageName.ext";
Stream inputStream = null; /* Get input stream from your source */
int width = 234;
int height = 1000;
Image image = imageProcessorService.Resize(imageName,inputStream,width,height);
Console.WriteLine("imageName is " + image.GetName()); 
Console.WriteLine("convertedImage is " + image.GetConvertedImage()); 
String jsonResponse = image.ToString();
Not Available
Coming Soon
name = "name';
input_stream = File.open('localPath', 'r');
width = "234";
height = "1000";
image = image_processor_service.resize_stream(name, input_stream, width, height);
puts "imageName is #{image.name}";
puts "originalImage is #{image.original_image}";
puts "convertedImage is #{image.converted_image}";
puts "width is #{image.width}";
puts "height is #{image.height}";
json_response = image.to_s();
Coming Soon 
Coming Soon 

Thumbnail With Inputstream

Creates a thumbnail of the image via Stream. There is a difference between thumbnail and resize The thumbnail operation is optimized for speed, it removes information of the image which is not necessary for a thumbnail e.g information. Returns the original image url and converted image url. Images are stored on the cloud and can be accessed through the urls Resizing is done based on the width and height provided.

Required Parameters

imageName - Name of the image file for which thumbnail has to be created. inputStream - InputStream of the local file for thumbnail. width - Width of the image for thumbnail. height - Height of the image for thumbnail.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.thumbnail(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
public class Callback : App42Callback  
{  
String imageName = "imageName.ext";
Stream inputStream = null; /* Get input stream from your source */
int width = 234;
int height = 1000;
uploadService.Thumbnail(imageName,inputStream,width,height,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Image image = (Image) response;     
		String jsonResponse = image.ToString();  
	}  
} 
NSString *imageName = @"imageName.ext";
NSString *imagePath = @"Your File Path";
int width = 234;	
int height = 1000;	
NSData *imageData = [NSData dataWithContentsOfFile:[NSURL fileURLWithPath:imagePath]];
ImageProcesor *image = [imageProcesorService thumbnail:imageName imageData:imageData width:width height:height];   
NSLog(@"imageName is = %@",image.name);
NSLog(@"convertedImage is = %@",image.convertedImage);
NSString *jsonResponse = [image toString];
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.thumbnail(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.thumbnail(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Coming Soon
Not Available
String imageName = "imageName.ext";
Stream inputStream = null; /* Get input stream from your source */
int width = 234;
int height = 1000;
Image image = imageProcessorService.Thumbnail(imageName,inputStream,width,height);
Console.WriteLine("imageName is " + image.GetName()); 
Console.WriteLine("convertedImage is " + image.GetConvertedImage()); 
String jsonResponse = image.ToString();
Not Available
Coming Soon
name = "Thumbnail1";
image_path = File.open('localPath', 'r');
width = "234";
height = "1000";					
image = image_processor_service.thumbnail_stream(name, image_path, width, height);  
puts "imageName is #{image.name}";
puts "originalImage is #{image.original_image}";
puts "convertedImage is #{image.converted_image}";
puts "width is #{image.width}";
puts "height is #{image.height}";			
json_response = image.to_s();
Coming Soon 
Coming Soon 

Scale With Inputstream

Scales the image based on width and height. Returns the original image url and converted image url. Images are stored in the cloud and can be accessed through the urls Resizing is done based on the width and height provided

Required Parameters

imageName - Name of the image to scale. inputStream - InputStream of the local file to scale. width - Width of the image to scale. height - Height of the image to scale.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.scale(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
public class Callback : App42Callback  
{  
String imageName = "imageName.ext";
Stream inputStream = null; /* Get input stream from your source */
int width = 234;
int height = 1000;
uploadService.Scale(imageName,inputStream,width,height,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Image image = (Image) response;     
		String jsonResponse = image.ToString();  
	}  
} 
NSString *imageName = @"imageName.ext";
NSString *imagePath = @"Your File Path";
int width = 234;	
int height = 1000;	
NSData *imageData = [NSData dataWithContentsOfFile:[NSURL fileURLWithPath:imagePath]];
ImageProcesor *image = [imageProcesorService scale:imageName imageData:imageData width:width height:height];   
NSLog(@"imageName is = %@",image.name);
NSLog(@"convertedImage is = %@",image.convertedImage);
NSString *jsonResponse = [image toString];
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.scale(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.scale(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Coming Soon
Not Available
String imageName = "imageName.ext";
Stream inputStream = null; /* Get input stream from your source */
int width = 234;
int height = 1000;
Image image = imageProcessorService.Scale(imageName,imagePath,width,height);
Console.WriteLine("imageName is " + image.GetName()); 
Console.WriteLine("convertedImage is " + image.GetConvertedImage()); 
String jsonResponse = image.ToString();
Not Available
Coming Soon
name = "Scale01";
image_path = File.open('localPath', 'r');
width = "234";
height = "1000";						
image = image_processor_service.scale_stream(name, image_path, width, height);  
puts "imageName is #{image.name}";
puts "originalImage is #{image.original_image}";
puts "convertedImage is #{image.converted_image}";
puts "width is #{image.width}";
puts "height is #{image.height}";		
json_response = image.to_s();
Coming Soon 
Coming Soon 

Crop With Inputstream

Crops image based on width, height and x, y coordinates. Returns the original image url and converted image url. Images are stored in the cloud and can be accessed through the urls Resizing is done based on the width and height provided

Required Parameters

imageName - Name of the image to crop. inputStream - InputStream of the local file to crop. width - Width of the image to crop. height - Height of the image to crop.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.crop(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
public class Callback : App42Callback  
{  
String imageName = "imageName.ext";
Stream inputStream = null; /* Get input stream from your source */
int width = 234;
int height = 1000;
uploadService.Crop(imageName,inputStream,width,height,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Image image = (Image) response;     
		String jsonResponse = image.ToString();  
	}  
} 
NSString *imageName = @"imageName.ext";
NSString *imagePath = @"Your File Path";
int width = 234;	
int height = 1000;	
NSData *imageData = [NSData dataWithContentsOfFile:[NSURL fileURLWithPath:imagePath]];
ImageProcesor *image = [imageProcesorService crop:imageName imageData:imageData width:width height:height];   
NSLog(@"imageName is = %@",image.name);
NSLog(@"convertedImage is = %@",image.convertedImage);
NSString *jsonResponse = [image toString];
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.crop(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.crop(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Coming Soon
Not Available
String imageName = "imageName.ext";
Stream inputStream = null; /* Get input stream from your source */
int width = 234;
int height = 1000;
Image image = imageProcessorService.Crop(imageName,imagePath,width,height);
Console.WriteLine("imageName is " + image.GetName()); 
Console.WriteLine("convertedImage is " + image.GetConvertedImage()); 
String jsonResponse = image.ToString();
Not Available
Coming Soon
name = "Crop";
image_path = File.open('localPath', 'r');
width = "234";
height = "1000";
x = "34" ;
y = "32" ;						
image = image_processor_service.crop_stream(name, image_path, width, height, x, y); 
puts "imageName is #{image.name}";
puts "originalImage is #{image.originalImage}";
puts "convertedImage is #{image.convertedImage}";
puts "width is #{image.width}";
puts "height is #{image.height}";			
json_response = image.to_s(); 
Coming Soon 
Coming Soon 

Resize By Percentage With Inputstream

Resize image by Percentage. Returns the original image url and converted image url. Images are stored in the cloud and can be accessed through the urls Resizing is done based on the width and height provided

Required Parameters

imageName - Name of the image to resize. inputStream - InputStream of the local file to resize. percentage - Percentage to which image has to be resized.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.resizeByPercentage(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
public class Callback : App42Callback  
{  
String imageName = "imageName.ext";
Stream inputStream = null; /* Get input stream from your source */
int width = 234;
int height = 1000;
uploadService.ResizeByPercentage(imageName,inputStream,width,height,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Image image = (Image) response;     
		String jsonResponse = image.ToString();  
	}  
} 
NSString *imageName = @"imageName.ext";
NSString *imagePath = @"Your File Path";
int width = 234;	
int height = 1000;	
NSData *imageData = [NSData dataWithContentsOfFile:[NSURL fileURLWithPath:imagePath]];
ImageProcesor *image = [imageProcesorService resizeByPercentage:imageName imageData:imageData width:width height:height];   
NSLog(@"imageName is = %@",image.name);
NSLog(@"convertedImage is = %@",image.convertedImage);
NSString *jsonResponse = [image toString];
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.resizeByPercentage(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.ResizeByPercentage(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Coming Soon
Not Available
String imageName = "imageName.ext";
Stream inputStream = null; /* Get input stream from your source */
int width = 234;
int height = 1000;
Image image = imageProcessorService.Resize(imageName,imagePath,width,height);
Console.WriteLine("imageName is " + image.GetName()); 
Console.WriteLine("convertedImage is " + image.GetConvertedImage()); 
String jsonResponse = image.ToString();
Not Available
Coming Soon
name = "ResizeByPercentage02";
image_path = "Local file path";
percentage = "100";					
image = image_processor_service.resize_by_percentage_stream(name, image_path, percentage); 
puts "imageName is #{image.name}";
puts "originalImage is #{image.original_image}";
puts "convertedImage is #{image.converted_image}";
puts "width is #{image.width}";
puts "height is #{image.height}";
json_response = image.to_s();
Coming Soon 
Coming Soon 

Thumbnail By Percentage With Inputstream

Creates a thumbnail of the image by Percentage. There is a difference between thumbnail and resize. The thumbnail operation is optimized for speed removes information of the image which is not necessary for a thumbnail to reduce size e.g header information. Returns the original image url and converted image url. Images are stored in the cloud and can be accessed through the urls. Resizing is done based on the width and height provided.

Required Parameters

imageName - Name of the image file for which thumbnail has to be created. inputStream - InputStream of the local file for thumbnail. percentage - Percentage for thumbnail.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.thumbnailByPercentage(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
public class Callback : App42Callback  
{  
String imageName = "imageName.ext";
Stream inputStream = null; /* Get input stream from your source */
int width = 234;
int height = 1000;
uploadService.ThumbnailByPercentage(imageName,inputStream,width,height,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Image image = (Image) response;     
		String jsonResponse = image.ToString();  
	}  
} 
NSString *imageName = @"imageName.ext";
NSString *imagePath = @"Your File Path";
int width = 234;	
int height = 1000;	
NSData *imageData = [NSData dataWithContentsOfFile:[NSURL fileURLWithPath:imagePath]];
ImageProcesor *image = [imageProcesorService thumbnailByPercentage:imageName imageData:imageData width:width height:height];   
NSLog(@"imageName is = %@",image.name);
NSLog(@"convertedImage is = %@",image.convertedImage);
NSString *jsonResponse = [image toString];
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.thumbnailByPercentage(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.thumbnailByPercentage(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Coming Soon
Not Available
String imageName = "imageName.ext";
Stream inputStream = null; /* Get input stream from your source */
int width = 234;
int height = 1000;
Image image = imageProcessorService.ThumbnailByPercentage(imageName,imagePath,width,height);
Console.WriteLine("imageName is " + image.GetName()); 
Console.WriteLine("convertedImage is " + image.GetConvertedImage()); 
String jsonResponse = image.ToString();
Not Available
Coming Soon
name = "ThumbnailByPercentage";
image_path = "Local file path";
percentage = "100";
image = image_processor_service.thumbnail_by_percentage_stream(name, image_path, percentage); 
puts "imageName is #{image.name}";
puts "originalImage is #{image.original_image}";
puts "convertedImage is #{image.converted_image}";
puts "percentage is #{image.percentage}";
json_response = image.to_s();
Coming Soon 
Coming Soon 

Scale By Percentage With Inputstream

Scales the image by Percentage. Returns the original image url and converted image url. Images are stored in the cloud and can be accessed through the urls Resizing is done based on the width and height provided.

Required Parameters

imageName - Name of the image file to scale. inputStream - InputStream of the local file to scale. percentage - Percentage to which image has to be scaled.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.scaleByPercentage(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
public class Callback : App42Callback  
{  
String imageName = "imageName.ext";
Stream inputStream = null; /* Get input stream from your source */
int width = 234;
int height = 1000;
uploadService.ScaleByPercentage(imageName,inputStream,width,height,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Image image = (Image) response;     
		String jsonResponse = image.ToString();  
	}  
} 
NSString *imageName = @"imageName.ext";
NSString *imagePath = @"Your File Path";
int width = 234;	
int height = 1000;	
NSData *imageData = [NSData dataWithContentsOfFile:[NSURL fileURLWithPath:imagePath]];
ImageProcesor *image = [imageProcesorService scaleByPercentage:imageName imageData:imageData width:width height:height];   
NSLog(@"imageName is = %@",image.name);
NSLog(@"convertedImage is = %@",image.convertedImage);
NSString *jsonResponse = [image toString];
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.scaleByPercentage(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.scaleByPercentage(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Coming Soon
Not Available
String imageName = "imageName.ext";
Stream inputStream = null; /* Get input stream from your source */
int width = 234;
int height = 1000;
Image image = imageProcessorService.ScaleByPercentage(imageName,imagePath,width,height);
Console.WriteLine("imageName is " + image.GetName()); 
Console.WriteLine("convertedImage is " + image.GetConvertedImage()); 
String jsonResponse = image.ToString();
Not Available
Coming Soon
name = "ScaleByPercentage";
image_path = "Local file path";
percentage = "100";
image = image_processor_service.scale_by_percentage_stream(name, image_path, percentage); 
puts "imageName is #{image.name}";
puts "originalImage is #{image.original_image}";
puts "convertedImage is #{image.converted_image}";
puts "percentage is #{image.percentage}";			
json_response = image.to_s();
Coming Soon 
Coming Soon 

Convert Format With Input Stream

Converts the format of the image. Returns the original image url and converted image url. Images are stored on the cloud and can be accessed through the urls Conversion is done based on the formatToConvert provided

Required Parameters

imageName - Name of the image to resize. inputStream - InputStream of the local file for convert. convertFormat - Format in which you need to convert the file.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.convertFormat(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
public class Callback : App42Callback  
{  
String imageName = "imageName.ext";
Stream inputStream = null; /* Get input stream from your source */
int width = 234;
int height = 1000;
uploadService.ConvertFormat(imageName,inputStream,width,height,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Image image = (Image) response;     
		String jsonResponse = image.ToString();  
	}  
} 
NSString *imageName = @"imageName.ext";
NSString *imagePath = @"Your File Path";
int width = 234;	
int height = 1000;	
NSData *imageData = [NSData dataWithContentsOfFile:[NSURL fileURLWithPath:imagePath]];
ImageProcesor *image = [imageProcesorService convertFormat:imageName imageData:imageData width:width height:height];   
NSLog(@"imageName is = %@",image.name);
NSLog(@"convertedImage is = %@",image.convertedImage);
NSString *jsonResponse = [image toString];
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.convertFormat(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
String imageName = "imageName.ext";
InputStream inputStream = null; /* Get input stream from your source */
Integer width = new Integer(234);
Integer height = new Integer(1000);
Image image = imageProcessorService.convertFormat(imageName,inputStream,width,height);  
System.out.println("imageName is " + image.getName());
System.out.println("convertedImage is " + image.getConvertedImage());
String jsonResponse = image.toString();
Coming Soon
Not Available
String imageName = "imageName.ext";
Stream inputStream = null; /* Get input stream from your source */
int width = 234;
int height = 1000;
Image image = imageProcessorService.ConvertFormat(imageName,imagePath,width,height);
Console.WriteLine("imageName is " + image.GetName()); 
Console.WriteLine("convertedImage is " + image.GetConvertedImage()); 
String jsonResponse = image.ToString();
Not Available
Coming Soon
name = "Convert";
image_path = "Local file path";
format_to_convert = "Format of file to be convert";						
image = image_processor_service.convert_format_with_stream(name, image_path, format_to_convert);
puts "imageName is #{image.name}";
puts "originalImage is #{image.original_image}";
puts "convertedImage is #{image.converted_image}";
json_response = image.to_string();
Coming Soon 
Coming Soon 

Exception Handling

The functions available under Image Processor API can throw some exceptions in abnormal conditions. Example of the same has been given below. E.g. If App developer is resizing the image file and storing it with the name which already exist in the database, the function will throw the Exception with message as “Bad Request” and the appErrorCode as “3200” and the details as “The request parameters are invalid. Image with the name ‘@name’ already exists.”.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
 
String imageName = "imageName";
String imagePath = "Your File Path";
Integer width = new Integer(234);
Integer height = 1000;	
try
{
	Image image = imageProcessorService.resize(imageName,imagePath, width,height);
}
catch(App42Exception ex)
{
	int appErrorCode = ex.getAppErrorCode();
	int httpErrorCode = ex.getHttpErrorCode();
	if(appErrorCode == 3200)
	{
	// Handle here for Bad Request (The request parameters are invalid. Image with the name '@name' already exists.)
	}	
	else if(appErrorCode == 1401){
	// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
	// handle here for Internal Server Error
	}	
	String jsonText = ex.getMessage(); 
}    
public class Callback : App42Callback  
{ 
String imageName = "imageName.jpg";
int width = 234;
int height = 1000;	
Stream inputStream = "Stream of file";	
imageProcessorService.Resize(imageName,inputStream, width,height, this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		int appErrorCode = exception.GetAppErrorCode();
		int httpErrorCode = exception.GetHttpErrorCode();
		if(appErrorCode == 3200)
		{
		// Handle here for Bad Request (The request parameters are invalid. Image with the name '@imageName' already exists.)
		}	
		else if(appErrorCode == 1401){
		// handle here for Client is not authorized
		}
		else if(appErrorCode == 1500){
		// handle here for Internal Server Error
		}	
		String jsonText = exception.GetMessage(); 
	}  
	void App42Callback.OnSuccess(Object object)  
	{  
		Cart cart = (Cart) object;
		String jsonResponse = cart.ToString();  
	}  
}  
	
String imageName = "imageName";
String imagePath = "Your File Path";
int width = 234;
int height = 1000;	
@try
{
	Image *image= [imageProcessorService resize:imageName imagePath:imagePath width:width height:height];
} @catch(App42Exception *ex) {
	int appErrorCode = ex.appErrorCode;
	int httpErrorCode = ex.httpErrorCode;
	if(appErrorCode == 3200)
	{
	// Handle here for Bad Request (The request parameters are invalid. Image with the name '@name' already exists.)
	}	
	else if(appErrorCode == 1401){
	// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
	// handle here for Internal Server Error
	}	
	NSString *jsonText = ex.reason; 
} 
String imageName = "imageName.jpg";
InputStream inputStream = "Stream of file";
Integer width = new Integer(234);
Integer height = 1000;	
try
{
	Image image = imageProcessorService.resize(imageName,inputStream, width,height);
}
catch(App42Exception ex)
{
	int appErrorCode = ex.getAppErrorCode();
	int httpErrorCode = ex.getHttpErrorCode();
	if(appErrorCode == 3200)
	{
	// Handle here for Bad Request (The request parameters are invalid. Image with the name '@name' already exists.)
	}	
	else if(appErrorCode == 1401){
	// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
	// handle here for Internal Server Error
	}	
	String jsonText = ex.getMessage(); 
}    
String imageName = "imageName";
String imagePath = "Your File Path";
Integer width = new Integer(234);
Integer height = 1000;	
try
{
	Image image = imageProcessorService.resize(imageName,imagePath, width,height);
}
catch(App42Exception ex)
{
	int appErrorCode = ex.getAppErrorCode();
	int httpErrorCode = ex.getHttpErrorCode();
	if(appErrorCode == 3200)
	{
	// Handle here for Bad Request (The request parameters are invalid. Image with the name '@name' already exists.)
	}	
	else if(appErrorCode == 1401){
	// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
	// handle here for Internal Server Error
	}	
	String jsonText = ex.getMessage(); 
}    
Coming Soon
Not Available
String imageName = "imageName";
String imagePath = "Your File Path";
int width = 234;
int height = 1000;	
try
{
	Image image = imageProcessorService.Resize(imageName,imagePath, width,height);
}
catch(App42Exception ex)
{
	int appErrorCode = ex.GetAppErrorCode();
	int httpErrorCode = ex.GetHttpErrorCode();
	if(appErrorCode == 3200)
	{
	// Handle here for Bad Request (The request parameters are invalid. Image with the name '@name' already exists.)
	}	
	else if(appErrorCode == 1401){
	// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
	// handle here for Internal Server Error
	}	
	String jsonText = ex.GetMessage(); 
}    
$imageName = "imageName";
$imagePath = "Your File Path";
$width = 234;
$height = 1000;
try
{
	$image = $imageProcessorService->resize($imageName,$imagePath, $width,$height);
}
catch(App42Exception $ex) 
{
	$appErrorCode = $ex->getAppErrorCode();
	$httpErrorCode = $ex->getHttpErrorCode();
	if($appErrorCode == 3200)
	{
	// Handle here for Bad Request (The request parameters are invalid. Image with the name '@name' already exists.)
	}	
	else if($appErrorCode == 1401){
	// handle here for Client is not authorized
	}
	else if($appErrorCode == 1500){
	// handle here for Internal Server Error
	}	
	$jsonText = $ex->getMessage(); /* returns the Exception text in JSON format. (as shown below)*/	
}
Coming Soon
Coming Soon
Coming Soon 
Coming Soon

Error Codes

Functions in Image API might throw exceptions with following HTTP and Application Error Codes (along with their descriptions):

1400 - BAD REQUEST - The Request parameters are invalid. 1401 - UNAUTHORIZED - Client is not authorized. 1500 - INTERNAL SERVER ERROR - Internal Server Error. Please try again. 3200 - BAD REQUEST - The request parameters are invalid. Image with the name '@name' already exists.