В этом разделе
Sends an asynchronous request for rendering of image thumbnail.
Синтаксис
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(
: object,
: Function,
: 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:
- 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. - Otherwise, jqXHR object.
Исключения
Исключение | Описание |
| Thrown if arguments have wrong types. |
Смотрите также