From e50561b53a5bd9c63e750847a116f0ea8c3727df Mon Sep 17 00:00:00 2001
From: ztyyLV <97287824+ztyyLV@users.noreply.github.com>
Date: Fri, 3 Mar 2023 17:04:23 +0800
Subject: [PATCH] Update WebTwain_Edit.md
---
info/api/WebTwain_Edit.md | 420 ++++++++++++++++++++++----------------
1 file changed, 241 insertions(+), 179 deletions(-)
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;
-
---