VintaSoft Imaging .NET SDK v8.8 for Web
Vintasoft.Imaging.ImageProcessing Namespace / WebPosterizeCommandJS type / execute Method
Image that should be processed.
Function that will be executed if request is executed successfully.
Here is function prototype "function __success(data)".
The data parameter has the following properties:
Function that will be executed if request is failed.
Here is function prototype "function __error(data)".
The data parameter can be:
  1. An object with following properties:
    • errorMessage (string): Error message.
    • blocked (boolean): Indicates that the requested action is blocked by another request.
    if exception is catched inside web service.
  2. Otherwise, jqXHR object.
WebServiceJS that shoud process the image.
In This Topic
    execute Method
    In This Topic
    Executes the image processing command.
    Syntax
    var instance = new Vintasoft.Imaging.ImageProcessing.WebPosterizeCommandJS();
    var value; // Type: boolean
    
    // Parameters
    var image; // Type:  object
    var successFunc; // Type:  object
    var errorFunc; // Type:  object
    var service; // Type:  object
    
    value = instance.execute(image, successFunc, errorFunc, service);
    function execute( 
       image : object,
       successFunc : object,
       errorFunc : object,
       service : object
    ) : boolean;

    Parameters

    image
    Image that should be processed.
    successFunc
    Function that will be executed if request is executed successfully.
    Here is function prototype "function __success(data)".
    The data parameter has the following properties:
    • imageInfo (object): Information about image (image ID and page index).
    • sourceImage (object): WebImageJS object, which represents source image.
    • processedImage (object): WebImageJS object, which represents processed image.
    errorFunc
    Function that will be executed if request is failed.
    Here is function prototype "function __error(data)".
    The data parameter can be:
    1. An object with following properties:
      • errorMessage (string): Error message.
      • blocked (boolean): Indicates that the requested action is blocked by another request.
      if exception is catched inside web service.
    2. Otherwise, jqXHR object.
    service
    WebServiceJS that shoud process the image.

    Return Value

    true if image is processed; false if processing is canceled or not necessary.
    Exceptions
    ExceptionDescription
    Thrown if arguments have wrong types.
    Thrown if image has an unsupported pixel format.
    Remarks
    Possible combinations of input parameters:
    • execute(image)
    • execute(image, service)
    • execute(image, successFunc, service)
    • execute(image, successFunc, errorFunc)
    • execute(image, successFunc, errorFunc, service)
    Browser Compatibility
    9
    5
    15
    5
    See Also