VintaSoft Imaging .NET SDK 12.4: Documentation for Web developer
Vintasoft.Shared Namespace / WebImageJS type / renderThumbnail Property
Syntax Exceptions BrowserCompatibility SeeAlso
In This Topic
    renderThumbnail Method
    In This Topic
    Sends an asynchronous request for rendering of image thumbnail.
    Syntax
    var instance = new Vintasoft.Shared.WebImageJS(imageSource, pageIndex);
    
    var value; // Type: any
    
    // Parameters
    var thumbnailRenderingSettings; // Type: object
    var successFunc; // Type: function
    var errorFunc; // Type: function
    
    value = instance.renderThumbnail(thumbnailRenderingSettings, successFunc, errorFunc);
    
    
    function renderThumbnail(
    thumbnailRenderingSettings
    Settings for rendering of image thumbnail.
    An object with following properties:
    • width (number): Thumbnail width in pixels. Required parameter.
    • height (number): Thumbnail height in pixels. Required parameter.
    • useCache (boolean): A value indicating whether rendered thumbnail must be saved on sever. Optional parameter, default value is true.
    • format (object): An instance of WebImageTypeEnumJS class that defines a format in which an image thumbnail must be returned. Optional parameter, default value is WebImageTypeEnumJS.Url
    • renderingSettings (object): WebRenderingSettingsJS object. Optional parameter, default value is WebImageJS.get_RenderingSettings of image.
    • decodingSettings (object): WebDecodingSettingsJS object. Optional parameter, default value is WebImageJS.get_DecodingSettings of image.
    : object,
    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:
    • fileId (string): Image file identifier.
    • imageParam (object): An object with information about image:
      • imageSize (object): An object that contains image width and height.
      • imageResolution (object): An object that contains image resolution.
      • pixelFormat (object): An instance of WebPixelFormatEnumJS class that defines the image pixel format.
      • isVector (boolean): Indicates that the image has vector decoder.
    • image (object): An instance of WebImageJS class that represents the source image.
    : Function,
    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.
    : Function
    ) : any;

    Parameters

    thumbnailRenderingSettings
    Settings for rendering of image thumbnail.
    An object with following properties:
    • width (number): Thumbnail width in pixels. Required parameter.
    • height (number): Thumbnail height in pixels. Required parameter.
    • useCache (boolean): A value indicating whether rendered thumbnail must be saved on sever. Optional parameter, default value is true.
    • format (object): An instance of WebImageTypeEnumJS class that defines a format in which an image thumbnail must be returned. Optional parameter, default value is WebImageTypeEnumJS.Url
    • renderingSettings (object): WebRenderingSettingsJS object. Optional parameter, default value is WebImageJS.get_RenderingSettings of image.
    • decodingSettings (object): WebDecodingSettingsJS object. Optional parameter, default value is WebImageJS.get_DecodingSettings of image.
    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:
    • fileId (string): Image file identifier.
    • imageParam (object): An object with information about image:
      • imageSize (object): An object that contains image width and height.
      • imageResolution (object): An object that contains image resolution.
      • pixelFormat (object): An instance of WebPixelFormatEnumJS class that defines the image pixel format.
      • isVector (boolean): Indicates that the image has vector decoder.
    • image (object): An instance of WebImageJS class that represents the source 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.
    Exceptions
    ExceptionDescription
    Thrown if arguments have wrong types.
    Browser Compatibility
    56+
    45+
    11
    See Also