diff --git a/faq/change-dynamsoft-service-certificate.md b/faq/change-dynamsoft-service-certificate.md index 61a13050..29a9d950 100644 --- a/faq/change-dynamsoft-service-certificate.md +++ b/faq/change-dynamsoft-service-certificate.md @@ -22,4 +22,4 @@ To replace the default certificate, the steps are: - Replace the old keys in `C:\Windows\SysWOW64\Dynamsoft\DynamsoftServicex64_17\cert` - Restart the service -NOTE: For v17.2 or higher versions, you can use the new API UpdateCert to automatically update the client side certificate. + diff --git a/faq/failed-to-load-resource.md b/faq/failed-to-load-resource.md index 8d79823f..f51329d2 100644 --- a/faq/failed-to-load-resource.md +++ b/faq/failed-to-load-resource.md @@ -19,36 +19,51 @@ You get an error message that says **"Failed to load resource: net::ERR_CERT_DAT ### Cause -By default, we use "127.0.0.1" for service connection. However, you may use our "local.dynamsoft.com" certificate by setting **Dynamsoft.WebTwainEnv.Host = "local.dynamsoft.com"** or **Dynamsoft.DWT.Host="local.dynamsoft.com"**. - -Ref: In which cases would I use local.dynamsoft.com instead of 127.0.0.1? - -In this case, if you are trying to access an application that integrates a version of Dynamic Web TWAIN V15.3 ~ V17.2.5, you will get the error. Because the old "local.dynamsoft.com" certificate expired on January 9th, 2023. - -### Resolution - -- For v17.1.1 or older versions, choose one of the following approaches: - - Method 1. Upgrade to V18.0+ which comes with a valid certificate - - Method 2. If you must fix the issue on a few client machines immediately, manually update the following cert files on the client-side machine. Click here to download the new certificate and use the new server.pem.ldsc & server_key.pem.ldsc to replace the old one under **`C:\Windows\SysWOW64\Dynamsoft\DynamsoftService(DynamsoftServicex64)\cert`**. -Note: the new certificate from Dynamsoft will expire on December 8th, 2023. This means you will need to update the certificate again after this certificate expires. - - Method 3. Contact Dynamsoft for a new MSI for client-side. - -- For v17.2 or higher versions, use the new API UpdateCert to automatically update the client side certificate before it expires. **Please go to dynamsoft.webtwain.install.js file in the Resource Folder and search the keyword "OnSSLCertInfo"**, add the following lines of code: - ```javascript - Dynamsoft.OnSSLCertInfo = function (sslExpiredDate) { - if ((sslExpiredDate - new Date()) / 86400000 < 15) { // Automatically updates 15 days before expiration - Dynamsoft.DWT.UpdateCert( - "https://demo.dynamsoft.com/DWT/Resources/dist/cert.zip", - function () { - //Success callback - }, - function (errorCode, errorString) { - console.log(errorString); +By default, “127.0.0.1” is used for service connection. "127.0.0.1" uses a self-signed certificate because it is an internal IP address, if your environment requires high level security, self-signed certificates may not be accepted. Moreover, Android OS or Chrome OS does not accept connection between browsers and Dynamsoft Service via "127.0.0.1". + + +In the case that you have used our expired certificate - local.dynamsoft.com, you will need to update to the latest VeriSign’ed certificate. The most recent expired "local.dynamsoft.com" certificate expired on January 9th, 2023 and the latest certificate will expire on December 8th, 2023 + +> ___Please note:___ _all official certificates issued by 3rd party come with an expiry date - generally one year. This means that each year the certificate will need to be updated if local.dynamsoft.com is used._ + + + + + +### Resolution + +- **No High Level Security Requirement**: + Set back to self-signed certificate "127.0.0.1" by comment the line `Dynamsoft.WebTwainEnv.Host = "local.dynamsoft.com"` or `Dynamsoft.DWT.Host="local.dynamsoft.com"` out. No need to worry about the expiry date of the certificate anymore. + +- **High Level Security Requirement (Please note: you need to replace the certificate annually due to expiration)** + + 1. (**Recommended**) Revert back to the self-signed certificate for "127.0.0.1". Dynamsoft understands the importance of information security and are committed to remaining one of the most security-compliant companies in the industry. Starting from April 9,2021, Dynamsoft becomes ISO 27001 certified. Although a self-sign certificate is being used all connections are limited to the device itself (127.0.0.1) which ensures security in most cases. + + 2. If you have to use "local.dynamsoft.com", the following methods can be taken: + - Method 1 (**Recommended**). Take advantage of the new feature -- **Remote Scan** which released in v18.0. With Remote Scan, you can limit the number of Dynamsoft Service Installations to a minimum. For more details, please refer to [What is Remote Scan](https://www.dynamsoft.com/remote-scan/docs/introduction/). + + - Method 2. If you must fix the issue on a few client machines immediately, manually update the following cert files on the client-side machine. Click here to download the new certificate and use the new server.pem.ldsc & server_key.pem.ldsc to replace the old one under **`C:\Windows\SysWOW64\Dynamsoft\DynamsoftService(DynamsoftServicex64)\cert`**. Then restart Dynamsoft Service. + > Note: the new certificate from Dynamsoft will expire on December 8th, 2023. This means you must update the certificate again after this certificate expires. + + - Method 3. Contact Dynamsoft for a new MSI for client-side. Please specify the exact service version build number found from the version your client currently has installed. + + - Method 4 (**Convenience but not recommend**). For v17.2 or higher versions, you can use the new API UpdateCert to automatically update the client side certificate before it expires. **Please go to dynamsoft.webtwain.install.js file in the Resource Folder and search the keyword "OnSSLCertInfo"**, add the following lines of code: + ```javascript + Dynamsoft.OnSSLCertInfo = function (sslExpiredDate) { + if ((sslExpiredDate - new Date()) / 86400000 < 15) { // Automatically updates 15 days before expiration + Dynamsoft.DWT.UpdateCert( + "https://demo.dynamsoft.com/DWT/Resources/dist/cert.zip", //You may use your own URL to where the new certificate is placed. + function () { + //Success callback + }, + function (errorCode, errorString) { + console.log(errorString); + } + ); } - ); - } - }; - ``` + }; + ``` + ***Please be aware that the download may not work properly in all environments due to your company's security policy.***
  • How do I upgrade my project to use the latest version of the Dynamic Web TWAIN SDK?
  • How do I upgrade the end-user installation for all end users once I upgrade my project?
  • diff --git a/info/api/Addon_BarcodeReader.md b/info/api/Addon_BarcodeReader.md index ba79a78a..ab63e8e8 100644 --- a/info/api/Addon_BarcodeReader.md +++ b/info/api/Addon_BarcodeReader.md @@ -158,12 +158,12 @@ interface Result { ## getRuntimeSettings -Get the current runtime settings. +Return the current runtime settings or the settings of the specified built-in template. The template can only be "speed", "balance", or "coverage". **Syntax** ```typescript -getRuntimeSettings(): Promise < RuntimeSettings > ; +getRuntimeSettings(template?: string): Promise < RuntimeSettings > ; interface RuntimeSettings { barcodeFormatIds: number; diff --git a/info/api/WebTwain_Buffer.md b/info/api/WebTwain_Buffer.md index f1700b4f..19f0fac1 100644 --- a/info/api/WebTwain_Buffer.md +++ b/info/api/WebTwain_Buffer.md @@ -52,19 +52,20 @@ The properties and methods on this page live in the namespace {WebTwainObject}. ## IndexToImageID +Return the imageId of an image specified by the index. + **Syntax** ```typescript -/** - -* Return the imageId of an image specified by the index. -* @param index The index of the image. - -*/ IndexToImageID(index: number): number; ``` +**Parameters** + +`index`: The index of the image. + **Availability** +
    @@ -91,17 +92,20 @@ IndexToImageID(index: number): number; ## ImageIDToIndex +Return the index of an image specified by the imageId. + **Syntax** ```typescript -/** - * Return the index of an image specified by the imageId. - * @param imageId The imageId of the image. - */ ImageIDToIndex(imageId: number): number; ``` +**Parameters** + +`imageId`: The imageId of the image. + **Availability** +
    @@ -132,18 +136,22 @@ An `imageId` is unique and won't change as long as the Dynamsoft Service process ## RenameTag +Rename a tag. + **Syntax** ```typescript -/** - * Rename a tag. - * @param oldName Specify the tag to change. - * @param newName Specify the new tag name. - */ RenameTag(oldName:string, newName:string): boolean; ``` +**Parameters** + +`oldName`: Specify the tag to change. + +`newName`: Specify the new tag name. + **Availability** +
    @@ -170,18 +178,27 @@ RenameTag(oldName:string, newName:string): boolean; ## RemoveTag +Remove the specified tag from one or more images(if not specified, remove from all). + **Syntax** ```typescript /** - * Remove the specified tag from one or more images(if not specified, remove from all). + * * @param tagName Specify the new tag name. * @param indices Specify the index. */ RemoveTag(tagName: string, indices?: number[]):boolean ``` +**Parameters** + +`tagName`: Specify the new tag name. + +`indices`: Specify the index. + **Availability** +
    @@ -212,22 +229,22 @@ If the index is null, it will remove the tag you specified. If the index is not ## GetTagList +Return the status of all current tags. + **Syntax** ```typescript -/** - * Return the status of all current tags. - */ GetTagList(): TagInfo[]; interface TagInfo { - name: string; - imageIds: number[]; - } + name: string; + imageIds: number[]; +} ``` **Availability** +
    @@ -254,17 +271,20 @@ interface TagInfo { ## ClearImageTags +Remove all tags from the specified image. + **Syntax** ```typescript -/** - * Remove all tags from the specified image. - * @param index Specify the image. - */ ClearImageTags(index: number): boolean; ``` +**Parameters** + +`index`: Specify the image. + **Availability** +
    @@ -291,17 +311,20 @@ ClearImageTags(index: number): boolean; ## FilterImagesByTag +Filter images by the specified tag. + **Syntax** ```typescript -/** - * Filter images by the specified tag. - * @param tag The tag used as the filter. If nothing or an empty string is used, the filter is cleared. - */ FilterImagesByTag(tag: string): boolean; ``` +**Parameters** + +`tag`: The tag used as the filter. If nothing or an empty string is used, the filter is cleared. + **Availability** +
    @@ -328,16 +351,16 @@ FilterImagesByTag(tag: string): boolean; ## ClearFilter +Stop filtering images by tag. Return an array of UUID of images under the viewer. + **Syntax** ```typescript -/** - * Stop filtering images by tag. Return an array of UUID of images under the viewer. - */ ClearFilter(): number[]; ``` **Availability** +
    @@ -364,17 +387,20 @@ ClearFilter(): number[]; ## SetDefaultTag +Set a default tag for newly acquired images. + **Syntax** ```typescript -/** - * Set a default tag for newly acquired images. - * @param tag Specifies the tag. - */ SetDefaultTag(tag: string): boolean; ``` +**Parameters** + +`tag`: Specifies the tag. + **Availability** +
    @@ -401,18 +427,22 @@ SetDefaultTag(tag: string): boolean; ## TagImages +Add a tag to specified images. + **Syntax** ```typescript -/** - * Add a tag to specified images. - * @param indices Specifies images to be tagged. - * @param tag Specify the tag. - */ TagImages(indices: number[], tag: string): boolean; ``` +**Parameters** + +`indices`: Specifies images to be tagged. + +`tag`: Specify the tag. + **Availability** +
    @@ -439,17 +469,20 @@ TagImages(indices: number[], tag: string): boolean; ## GetImageBitDepth +Return the pixel bit depth of the specified image. + **Syntax** ```typescript -/** - * Return the pixel bit depth of the specified image. - * @param index Specify the image. - */ GetImageBitDepth(index: number): number; ``` +**Parameters** + +`index`: Specify the image. + **Availability** +
    @@ -492,17 +525,20 @@ GetImageBitDepthAsync(index: number): Promise; ## GetImageHeight +Return the height (in pixels) of the specified image. + **Syntax** ```typescript -/** - * Return the height (in pixels) of the specified image. - * @param index Specify the image. - */ GetImageHeight(index: number): number; ``` +**Parameters** + +`index`: Specify the image. + **Availability** +
    @@ -529,17 +565,20 @@ GetImageHeight(index: number): number; ## GetImageWidth +Return the width (in pixels) of the specified image. + **Syntax** ```typescript -/** - * Return the width (in pixels) of the specified image. - * @param index Specify the image. - */ GetImageWidth(index: number): number; ``` +**Parameters** + +`index`: Specify the image. + **Availability** +
    @@ -566,17 +605,20 @@ GetImageWidth(index: number): number; ## GetImageXResolution +Return the horizontal resolution of the specified image. + **Syntax** ```typescript -/** - * Return the horizontal resolution of the specified image. - * @param index Specify the image. - */ GetImageXResolution(index: number): number; ``` +**Parameters** + +`index`: Specify the image. + **Availability** +
    @@ -603,17 +645,20 @@ GetImageXResolution(index: number): number; ## GetImageYResolution +Return the vertical resolution of the specified image. + **Syntax** ```typescript -/** - * Return the vertical resolution of the specified image. - * @param index Specify the image. - */ GetImageYResolution(index: number): number; ``` +**Parameters** + +`index`: Specify the image. + **Availability** +
    @@ -640,29 +685,31 @@ GetImageYResolution(index: number): number; ## GetSkewAngle +Return the skew angle of the specified image. + **Syntax** ```typescript -/** - * Return the skew angle of the specified image. - * @param index Specify the image. - * @param successCallback A callback function that is executed if the request succeeds. - * @param failureCallback A callback function that is executed if the request fails. - * @argument angle The skew angle. - * @argument errorCode The error code. - * @argument errorString The error string. - */ GetSkewAngle( index: number, - successCallback?: ( - angle: number) => void, - failureCallback?: ( - errorCode: number, - errorString: string) => void + successCallback?: (angle: number) => void, + failureCallback?: (errorCode: number, errorString: string) => void ): number | void; ``` +**Parameters** + +`index`: Specify the image. + +`successCallback`: A callback function that is executed if the request succeeds. +- `angle`: The skew angle. + +`failureCallback`: A callback function that is executed if the request fails. +- `errorCode`: The error code. +- `errorString`: The error string. + **Availability** +
    @@ -689,37 +736,43 @@ GetSkewAngle( ## GetSkewAngleEx +Return the skew angle of the specified rectangle on the specified image. + **Syntax** ```typescript -/** - * Return the skew angle of the specified rectangle on the specified image. - * @param index Specify the image. - * @param left The x-coordinate of the upper-left corner of the rectangle. - * @param top The y-coordinate of the upper-left corner of the rectangle. - * @param right The x-coordinate of the lower-right corner of the rectangle. - * @param bottom The y-coordinate of the lower-right corner of the rectangle. - * @param successCallback A callback function that is executed if the request succeeds. - * @param failureCallback A callback function that is executed if the request fails. - * @argument angle The skew angle. - * @argument errorCode The error code. - * @argument errorString The error string. - */ GetSkewAngleEx( index: number, left: number, top: number, right: number, bottom: number, - successCallback?: ( - angle: number) => void, - failureCallback?: ( - errorCode: number, - errorString: string) => void + successCallback?: (angle: number) => void, + failureCallback?: (errorCode: number, errorString: string) => void ): number | void; ``` +**Parameters** + +`index`: Specify the image. + +`left`: The x-coordinate of the upper-left corner of the rectangle. + +`top`: The y-coordinate of the upper-left corner of the rectangle. + +`right`: The x-coordinate of the lower-right corner of the rectangle. + +`bottom`: The y-coordinate of the lower-right corner of the rectangle. + +`successCallback`: A callback function that is executed if the request succeeds. +- `angle`: The skew angle. + +`failureCallback`: A callback function that is executed if the request fails. +- `errorCode`: The error code. +- `errorString`: The error string. + **Availability** +
    @@ -750,19 +803,24 @@ After you get the skew angle of an image, you can rotate it with the method [Rot ## GetImageSize +Calculate the size in bytes of the specified image assuming it's resized to the given dimensions. + **Syntax** ```typescript -/** - * Calculate the size in bytes of the specified image assuming it's resized to the given dimensions. - * @param index Specify the image. - * @param width Specify the width. - * @param height Specify the height. - */ GetImageSize(index: number, width: number, height: number): number; ``` +**Parameters** + +`index`: Specify the image. + +`width`: Specify the width. + +`height`: Specify the height. + **Availability** +
    @@ -789,18 +847,22 @@ GetImageSize(index: number, width: number, height: number): number; ## GetImageSizeWithSpecifiedType +Calculate the size in bytes of the specified image assuming an expected file type. + **Syntax** ```typescript -/** - * Calculate the size in bytes of the specified image assuming an expected file type. - * @param index Specify the image. - * @param type Specify the expected file type. - */ GetImageSizeWithSpecifiedType(index: number, type: Dynamsoft.DWT.EnumDWT_ImageType | number): number; ``` +**Parameters** + +`index`: Specify the image. + +`type`: Specify the expected file type. + **Availability** +
    @@ -827,17 +889,20 @@ GetImageSizeWithSpecifiedType(index: number, type: Dynamsoft.DWT.EnumDWT_ImageTy ## GetSelectedImagesSize +Calculate the size in bytes of all selected images assuming an expected file type. + **Syntax** ```typescript -/** - * Calculate the size in bytes of all selected images assuming an expected file type. - * @param type Sepcify the expected file type. - */ GetSelectedImagesSize(type: Dynamsoft.DWT.EnumDWT_ImageType | number): number; ``` +**Parameters** + +`type`: Sepcify the expected file type. + **Availability** +
    diff --git a/info/api/WebTwain_Edit.md b/info/api/WebTwain_Edit.md index 634823e3..059e0122 100644 --- a/info/api/WebTwain_Edit.md +++ b/info/api/WebTwain_Edit.md @@ -370,28 +370,30 @@ ConvertToGrayScaleAsync( ## Invert +Invert the colour of the pixels on the specified image. + **Syntax** ```typescript -/** - * Invert the colour of the pixels on the specified image. - * @param index Specify the image. - * @param successCallback A callback function that is executed if the request succeeds. - * @param failureCallback A callback function that is executed if the request fails. - * @argument errorCode The error code. - * @argument errorString The error string. - */ Invert( index: number, successCallback?: () => void, - failureCallback?: ( - errorCode: number, - errorString: string - ) => void + failureCallback?: (errorCode: number, errorString: string) => void ): void | boolean; ``` +**Parameters** + +`index`: Specify the image. + +`successCallback`: A callback function that is executed if the request succeeds. + +`failureCallback`: A callback function that is executed if the request fails. +- `errorCode`: The error code. +- `errorString`: The error string. + **Availability** +
    @@ -418,30 +420,33 @@ Invert( ## SetImageWidth +Change the width of the specified image by adding a margin or removing part of the image. + **Syntax** ```typescript -/** - * Change the width of the specified image by adding a margin or removing part of the image. - * @param index Specify the image. - * @param width Specify the new width. - * @param successCallback A callback function that is executed if the request succeeds. - * @param failureCallback A callback function that is executed if the request fails. - * @argument errorCode The error code. - * @argument errorString The error string. - */ SetImageWidth( index: number, width: number, successCallback?: () => void, - failureCallback?: ( - errorCode: number, - errorString: string - ) => void + failureCallback?: (errorCode: number, errorString: string) => void ): void | boolean; ``` +**Parameters** + +`index`: Specify the image. + +`width`: Specify the new width. + +`successCallback`: A callback function that is executed if the request succeeds. + +`failureCallback`: A callback function that is executed if the request fails. +- `errorCode`: The error code. +- `errorString`: The error string. + **Availability** +
    @@ -468,28 +473,30 @@ SetImageWidth( ## Flip +Flip the specified image. + **Syntax** ```typescript -/** - * Flip the specified image. - * @param index Specify the image. - * @param successCallback A callback function that is executed if the request succeeds. - * @param failureCallback A callback function that is executed if the request fails. - * @argument errorCode The error code. - * @argument errorString The error string. - */ Flip( index: number, successCallback?: () => void, - failureCallback?: ( - errorCode: number, - errorString: string - ) => void + failureCallback?: (errorCode: number, errorString: string) => void ): void | boolean; ``` +**Parameters** + +`index`: Specify the image. + + `successCallback`: A callback function that is executed if the request succeeds. + +`failureCallback`: A callback function that is executed if the request fails. +- `errorCode`: The error code. +- `errorString`: The error string. + **Availability** +
    @@ -534,28 +541,30 @@ FlipAsync( ## Mirror +Mirror the specified image. + **Syntax** ```typescript -/** - * Mirror the specified image. - * @param index Specify the image. - * @param successCallback A callback function that is executed if the request succeeds. - * @param failureCallback A callback function that is executed if the request fails. - * @argument errorCode The error code. - * @argument errorString The error string. - */ Mirror( index: number, successCallback?: () => void, - failureCallback?: ( - errorCode: number, - errorString: string - ) => void + failureCallback?: (errorCode: number, errorString: string) => void ): void | boolean; ``` +**Parameters** + +`index`: Specify the image. + +`successCallback`: A callback function that is executed if the request succeeds. + +`failureCallback`: A callback function that is executed if the request fails. +- `errorCode`: The error code. +- `errorString`: The error string. + **Availability** +
    @@ -599,28 +608,30 @@ MirrorAsync( ## RotateLeft +Rotate the specified image 90 degrees counterclockwise. + **Syntax** ```typescript -/** - * Rotate the specified image 90 degrees counterclockwise. - * @param index Specify the image. - * @param successCallback A callback function that is executed if the request succeeds. - * @param failureCallback A callback function that is executed if the request fails. - * @argument errorCode The error code. - * @argument errorString The error string. - */ RotateLeft( index: number, successCallback?: () => void, - failureCallback?: ( - errorCode: number, - errorString: string - ) => void + failureCallback?: (errorCode: number, errorString: string) => void ): void | boolean; ``` +**Parameters** + +`index`: Specify the image. + +`successCallback`: A callback function that is executed if the request succeeds. + +`failureCallback`: A callback function that is executed if the request fails. +- `errorCode`: The error code. +- `errorString`: The error string. + **Availability** +
    @@ -664,28 +675,30 @@ RotateLeftAsync( ## RotateRight +Rotate the specified image 90 degrees clockwise. + **Syntax** ```typescript -/** - * Rotate the specified image 90 degrees clockwise. - * @param index Specify the image. - * @param successCallback A callback function that is executed if the request succeeds. - * @param failureCallback A callback function that is executed if the request fails. - * @argument errorCode The error code. - * @argument errorString The error string. - */ RotateRight( index: number, successCallback?: () => void, - failureCallback?: ( - errorCode: number, - errorString: string - ) => void + failureCallback?: (errorCode: number, errorString: string) => void ): void | boolean; ``` +**Parameters** + +`index`: Specify the image. + +`successCallback`: A callback function that is executed if the request succeeds. + +`failureCallback`: A callback function that is executed if the request fails. +- `errorCode`: The error code. +- `errorString`: The error string. + **Availability** +
    @@ -729,32 +742,36 @@ RotateRightAsync( ## Rotate +Rotate the specified image by the specified angle. + **Syntax** ```typescript -/** - * Rotate the specified image by the specified angle. - * @param index Specify the image. - * @param angle Specify the angle. - * @param keepSize Whether to keep the original size. - * @param successCallback A callback function that is executed if the request succeeds. - * @param failureCallback A callback function that is executed if the request fails. - * @argument errorCode The error code. - * @argument errorString The error string. - */ Rotate( index: number, angle: number, keepSize: boolean, successCallback?: () => void, - failureCallback?: ( - errorCode: number, - errorString: string - ) => void + failureCallback?: (errorCode: number, errorString: string) => void ): void | boolean; ``` +**Parameters** + +`index`: Specify the image. + +`angle`: Specify the angle. + +`keepSize`: Whether to keep the original size. + +`successCallback`: A callback function that is executed if the request succeeds. + +`failureCallback`: A callback function that is executed if the request fails. +- `errorCode`: The error code. +- `errorString`: The error string. + **Availability** +
    @@ -803,34 +820,39 @@ RotateAsync( ## RotateEx +Rotate the specified image by the specified angle. + **Syntax** ```typescript -/** - * Rotate the specified image by the specified angle. - * @param index Specify the image. - * @param angle Specify the angle. - * @param keepSize Whether to keep the original size. - * @param method Specify the algorithm for the change. - * @param successCallback A callback function that is executed if the request succeeds. - * @param failureCallback A callback function that is executed if the request fails. - * @argument errorCode The error code. - * @argument errorString The error string. - */ RotateEx( index: number, angle: number, keepSize: boolean, method: Dynamsoft.DWT.EnumDWT_InterpolationMethod | number, successCallback?: () => void, - failureCallback?: ( - errorCode: number, - errorString: string - ) => void + failureCallback?: (errorCode: number, errorString: string) => void ): void | boolean; ``` +**Parameters** + +`index`: Specify the image. + +`angle`: Specify the angle. + +`keepSize`: Whether to keep the original size. + +`method`: Specify the algorithm for the change. Please refer to [Dynamsoft.DWT.EnumDWT_InterpolationMethod]({{site.info}}api/Dynamsoft_Enum.html#dynamsoftdwtenumdwt_interpolationmethod). + +`successCallback`: A callback function that is executed if the request succeeds. + +`failureCallback`: A callback function that is executed if the request fails. +- `errorCode`: The error code. +- `errorString`: The error string. + **Availability** +
    @@ -853,29 +875,15 @@ RotateEx(
    -**Usage notes** - -Check out [ `Dynamsoft.DWT.EnumDWT_InterpolationMethod` ]({{site.info}}api/Dynamsoft_Enum.html#dynamsoftdwtenumdwt_interpolationmethod). - --- ## Crop +Crop the specified image using the specified coordinates. + **Syntax** ```typescript -/** - * Crop the specified image using the specified coordinates. - * @param index Specify the image. - * @param left Specify the rectangle (leftmost coordinate). - * @param top Specify the rectangle (topmost coordinate). - * @param right Specify the rectangle (rightmost coordinate). - * @param bottom Specify the rectangle (bottommost coordinate). - * @param successCallback A callback function that is executed if the request succeeds. - * @param failureCallback A callback function that is executed if the request fails. - * @argument errorCode The error code. - * @argument errorString The error string. - */ Crop( index: number, left: number, @@ -883,14 +891,30 @@ Crop( right: number, bottom: number, successCallback?: () => void, - failureCallback?: ( - errorCode: number, - errorString: string - ) => void + failureCallback?: (errorCode: number, errorString: string) => void ): void | boolean; ``` +**Parameters** + +`index`: Specify the image. + +`left`: Specify the rectangle (leftmost coordinate). + +`top`: Specify the rectangle (topmost coordinate). + +`right`: Specify the rectangle (rightmost coordinate). + +`bottom`: Specify the rectangle (bottommost coordinate). + +`successCallback`: A callback function that is executed if the request succeeds. + +`failureCallback`: A callback function that is executed if the request fails. +- `errorCode`: The error code. +- `errorString`: The error string. + **Availability** +
    @@ -917,21 +941,11 @@ Crop( ## Erase +Erase a rectangular area from the specified image. + **Syntax** ```typescript -/** - * Erase a rectangular area from the specified image. - * @param index Specify the image. - * @param left Specify the rectangle (leftmost coordinate). - * @param top Specify the rectangle (topmost coordinate). - * @param right Specify the rectangle (rightmost coordinate). - * @param bottom Specify the rectangle (bottommost coordinate). - * @param successCallback A callback function that is executed if the request succeeds. - * @param failureCallback A callback function that is executed if the request fails. - * @argument errorCode The error code. - * @argument errorString The error string. - */ Erase( index: number, left: number, @@ -939,14 +953,30 @@ Erase( right: number, bottom: number, successCallback?: () => void, - failureCallback?: ( - errorCode: number, - errorString: string - ) => void + failureCallback?: (errorCode: number, errorString: string) => void ): void | boolean; ``` +**Parameters** + +`index`: Specify the image. + +`left`: Specify the rectangle (leftmost coordinate). + +`top`: Specify the rectangle (topmost coordinate). + +`right`: Specify the rectangle (rightmost coordinate). + +`bottom`: Specify the rectangle (bottommost coordinate). + +`successCallback`: A callback function that is executed if the request succeeds. + +`failureCallback`: A callback function that is executed if the request fails. +- `errorCode`: The error code. +- `errorString`: The error string. + **Availability** +
    @@ -973,17 +1003,20 @@ Erase( ## CopyToClipboard +Copy the specified image to the clipboard of the operating system. + **Syntax** ```typescript -/** - * Copy the specified image to the clipboard of the operating system. - * @param index Specify the image. - */ CopyToClipboard(index: number): boolean; ``` +**Parameters** + +`index`: Specify the image. + **Availability** +
    @@ -1006,7 +1039,6 @@ CopyToClipboard(index: number): boolean;
    - ---