dwt 16.2.4 → 16.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +16 -12
  2. package/dist/addon/dbrjs/dbr-7.6.0.full.wasm.js +4016 -4016
  3. package/dist/addon/dbrjs/dbr-7.6.0.worker.js +107 -107
  4. package/dist/addon/dbrjs/dbr.js +10 -10
  5. package/dist/dist/DynamsoftServiceSetup.deb +0 -0
  6. package/dist/dist/DynamsoftServiceSetup.msi +0 -0
  7. package/dist/dist/DynamsoftServiceSetup.pkg +0 -0
  8. package/dist/dist/DynamsoftServiceSetup.rpm +0 -0
  9. package/dist/dist/LICENSE +95 -95
  10. package/dist/dynamsoft.webtwain.min.js +209 -209
  11. package/dist/dynamsoft.webtwain.min.mjs +208 -208
  12. package/dist/src/dynamsoft.imageio_wasm-1.6.2.js +93 -93
  13. package/dist/src/dynamsoft.webtwain.css +1045 -1045
  14. package/dist/types/Addon.BarcodeReader.d.ts +168 -168
  15. package/dist/types/Addon.Camera.d.ts +125 -125
  16. package/dist/types/Addon.OCR.d.ts +264 -264
  17. package/dist/types/Addon.OCRPro.d.ts +251 -251
  18. package/dist/types/Addon.PDF.d.ts +110 -110
  19. package/dist/types/Addon.Webcam.d.ts +257 -257
  20. package/dist/types/Dynamsoft.Enum.d.ts +1850 -1849
  21. package/dist/types/Dynamsoft.FileUploader.d.ts +130 -130
  22. package/dist/types/Dynamsoft.d.ts +495 -495
  23. package/dist/types/WebTwain.Acquire.d.ts +1059 -1059
  24. package/dist/types/WebTwain.Buffer.d.ts +259 -259
  25. package/dist/types/WebTwain.Edit.d.ts +434 -434
  26. package/dist/types/WebTwain.IO.d.ts +951 -951
  27. package/dist/types/WebTwain.Util.d.ts +102 -102
  28. package/dist/types/WebTwain.Viewer.d.ts +795 -795
  29. package/dist/types/WebTwain.d.ts +51 -51
  30. package/dist/types/index.d.ts +20 -20
  31. package/package.json +2 -2
  32. package/samples/1.AcquireImage.html +0 -69
  33. package/samples/2.CustomScan.html +0 -98
  34. package/samples/3.PDFRasterizer.html +0 -73
  35. package/samples/4.OCRADocument.html +0 -156
  36. package/samples/5.ReadBarcode.html +0 -231
  37. package/samples/6.ScanOrCapture.html +0 -189
@@ -1,259 +1,259 @@
1
- import { DynamsoftEnums as Dynamsoft } from "./Dynamsoft.Enum";
2
- import { WebTwainIO } from "./WebTwain.IO";
3
-
4
- export interface WebTwainBuffer extends WebTwainIO {
5
- /**
6
- * Return the current deviation of the pixels in the image.
7
- */
8
- readonly BlankImageCurrentStdDev: number;
9
- /**
10
- * Return or set the standard deviation of the pixels in the image.
11
- */
12
- BlankImageMaxStdDev: number;
13
- /**
14
- * Return or set the dividing line between black and white. The default value is 128.
15
- */
16
- BlankImageThreshold: number;
17
- /**
18
- * Return or set how much physical memory is allowed for storing images currently loaded in Dynamic Web TWAIN. Once the limit is reached, images will be cached on the hard disk.
19
- */
20
- BufferMemoryLimit: number;
21
- /**
22
- * Remove all tags from the specified image.
23
- * @param index Specify the image.
24
- */
25
- ClearImageTags(index: number): boolean;
26
- /**
27
- * Return or set the current index of image in the buffer.
28
- */
29
- CurrentImageIndexInBuffer: number;
30
- /**
31
- * Filter images by the specified tag.
32
- * @param tag The tag used as the filter.
33
- */
34
- FilterImagesByTag(tag: string): boolean;
35
- /**
36
- * Return the pixel bit depth of the specified image.
37
- * @param index Specify the image.
38
- */
39
- GetImageBitDepth(index: number): number;
40
- /**
41
- * Return the height (in pixels) of the specified image.
42
- * @param index Specify the image.
43
- */
44
- GetImageHeight(index: number): number;
45
- /**
46
- * Return the internal URL of the specified image. If width and height are not specified,
47
- * you get the original image, otherwise you get the image with specified width or height
48
- * while keeping the same aspect ratio. The returned string is like this
49
- * 'dwt://dwt_trial_13000404/img?id=306159652&index=0&t=1502184632022'.
50
- * @param index Specify the image.
51
- * @param width the width of the image, it must be 150 or bigger
52
- * @param height the height of the image, it must be 150 or bigger
53
- */
54
- GetImagePartURL(index: number, width?: number, height?: number): string;
55
- /**
56
- * Calculate the size in bytes of the specified image assuming it's resized to the given dimensions.
57
- * @param index Specify the image.
58
- * @param width Specify the width.
59
- * @param height Specify the height.
60
- */
61
- GetImageSize(index: number, width: number, height: number): number;
62
- /**
63
- * Calculate the size in bytes of the specified image assuming an expected file type.
64
- * @param index Specify the image.
65
- * @param type Sepcify the expected file type.
66
- */
67
- GetImageSizeWithSpecifiedType(index: number, type: Dynamsoft.EnumDWT_ImageType | number): number;
68
- /**
69
- * Return the direct URL of the specified image, if width or height is set to -1,
70
- * you get the original image, otherwise you get the image with specified width or
71
- * height while keeping the same aspect ratio.
72
- * @param index Specify the image.
73
- * @param width Specify the width.
74
- * @param height Specify the height.
75
- */
76
- GetImageURL(index: number, width?: number, height?: number): string;
77
- /**
78
- * Return the width (in pixels) of the specified image.
79
- * @param index Specify the image.
80
- */
81
- GetImageWidth(index: number): number;
82
- /**
83
- * Return the horizontal resolution of the specified image.
84
- * @param index Specify the image.
85
- */
86
- GetImageXResolution(index: number): number;
87
- /**
88
- * Return the vertical resolution of the specified image.
89
- * @param index Specify the image.
90
- */
91
- GetImageYResolution(index: number): number;
92
- /**
93
- * [Deprecation] Return an index from the selected indices array. Read SelectedImagesIndices instead.
94
- * [Alternative] Read SelectedImagesIndices instead.
95
- * @param indexOfIndices Specify the index of the specified image.
96
- */
97
- GetSelectedImageIndex(indexOfIndices: number): number;
98
- /**
99
- * Calculate the size in bytes of all selected images assuming an expected file type.
100
- * @param type Sepcify the expected file type.
101
- */
102
- GetSelectedImagesSize(type: Dynamsoft.EnumDWT_ImageType | number): number;
103
- /**
104
- * Return the skew angle of the specified image.
105
- * @param index Specify the image.
106
- * @param successCallback A callback function that is executed if the request succeeds.
107
- * @param failureCallback A callback function that is executed if the request fails.
108
- * @argument angle The skew angle.
109
- * @argument errorCode The error code.
110
- * @argument errorString The error string.
111
- */
112
- GetSkewAngle(
113
- index: number,
114
- successCallback?: (
115
- angle: number) => void,
116
- failureCallback?: (
117
- errorCode: number,
118
- errorString: string) => void
119
- ): number | void;
120
- /**
121
- * Return the skew angle of the specified rectangle on the specified image.
122
- * @param index Specify the image.
123
- * @param left The x-coordinate of the upper-left corner of the rectangle.
124
- * @param top The y-coordinate of the upper-left corner of the rectangle.
125
- * @param right The x-coordinate of the lower-right corner of the rectangle.
126
- * @param bottom The y-coordinate of the lower-right corner of the rectangle.
127
- * @param successCallback A callback function that is executed if the request succeeds.
128
- * @param failureCallback A callback function that is executed if the request fails.
129
- * @argument angle The skew angle.
130
- * @argument errorCode The error code.
131
- * @argument errorString The error string.
132
- */
133
- GetSkewAngleEx(
134
- index: number,
135
- left: number,
136
- top: number,
137
- right: number,
138
- bottom: number,
139
- successCallback?: (
140
- angle: number) => void,
141
- failureCallback?: (
142
- errorCode: number,
143
- errorString: string) => void
144
- ): number | void;
145
- /**
146
- * Return how many images are held in the buffer
147
- */
148
- readonly HowManyImagesInBuffer: number;
149
- /**
150
- * Return or set whether the feature of disk caching is enabled.
151
- */
152
- IfAllowLocalCache: boolean;
153
- /**
154
- * Return the imageId of an image specified by the index.
155
- * @param index The index of the image.
156
- */
157
- IndexToImageID(index: number): number;
158
- /**
159
- * Return the index of an image specified by the imageId.
160
- * @param imageId The imageId of the image.
161
- */
162
- ImageIDToIndex(imageId: number): number;
163
- /**
164
- * Check whether the specified image is blank.
165
- * @param index Specify the image.
166
- */
167
- IsBlankImage(index: number): boolean;
168
- /**
169
- * [Deprecation] Detect whether a certain area on an image is blank.
170
- * [Alternative] Use IsBlankImage or IsBlankImageExpress instead.
171
- * @param index Specify the image.
172
- * @param left The x-coordinate of the upper-left corner of the rectangle.
173
- * @param top The y-coordinate of the upper-left corner of the rectangle.
174
- * @param right The x-coordinate of the lower-right corner of the rectangle.
175
- * @param bottom The y-coordinate of the lower-right corner of the rectangle.
176
- * @param bFuzzyMatch Specify whether use fuzzy matching when detecting.
177
- */
178
- IsBlankImageEx(index: number, left: number, top: number, right: number, bottom: number, bFuzzyMatch: boolean): boolean;
179
- /**
180
- * Check whether the specified image is blank.
181
- * @param index Specify the image.
182
- */
183
- IsBlankImageExpress(index: number): boolean;
184
- /**
185
- * Return or set how many images can be held in the buffer.
186
- */
187
- MaxImagesInBuffer: number;
188
- /**
189
- * Change the position of an image in the buffer.
190
- * @param from Specify the original position by index.
191
- * @param to Specify the target position by index.
192
- */
193
- MoveImage(from: number, to: number): boolean;
194
- /**
195
- * Remove all images in the buffer.
196
- */
197
- RemoveAllImages(): boolean;
198
- /**
199
- * Remove the selected images in the buffer.
200
- */
201
- RemoveAllSelectedImages(): boolean;
202
- /**
203
- * Remove the specified image.
204
- * @param index Specify the image.
205
- */
206
- RemoveImage(index: number): boolean;
207
- /**
208
- * Select all images and return the indices.
209
- */
210
- SelectAllImages(): number[];
211
- /**
212
- * [Deprecation] Return how many images are selected.
213
- * [Alternative] Read the length of SelectedImagesIndices instead.
214
- */
215
- SelectedImagesCount: number;
216
- /**
217
- * Return the indices of the selected images.
218
- */
219
- readonly SelectedImagesIndices: number[];
220
- /**
221
- * Select the specified images.
222
- * @param indices Specify one or multiple images.
223
- */
224
- SelectImages(indices: number[]): boolean;
225
- /**
226
- * Specify a aspect ratio to be used when selecting a rectangle on an image.
227
- */
228
- SelectionRectAspectRatio: number;
229
- /**
230
- * Set a default tag for newlay acquired images.
231
- * @param tag Specifies the tag.
232
- */
233
- SetDefaultTag(tag: string): boolean;
234
- /**
235
- * [Deprecation] You can use the method to select images programatically.
236
- * [Alternative] Use SelectImages() or SelectAllImages() instead.
237
- * @param indexOfIndices The index of an array that holds the indices of selected images.
238
- * @param index The index of an image that you want to select.
239
- */
240
- SetSelectedImageIndex(indexOfIndices: number, index: number): boolean;
241
- /**
242
- * Exchange the positions of two images.
243
- * @param index1 Specify the 1st image.
244
- * @param index2 Specify the 2nd image.
245
- */
246
- SwitchImage(index1: number, index2: number): boolean;
247
- /**
248
- * Add a tag to specified images.
249
- * @param indices Specifies images to be tagged.
250
- * @param tag Specify the tag.
251
- */
252
- TagImages(indices: number[], tag: string): boolean;
253
- /**
254
- * Rename Tag.
255
- * @param oldTag Old tag name.
256
- * @param newTag Specify the new tag name.
257
- */
258
- RenameTag(oldTag: string, newTag: string): boolean;
259
- }
1
+ import { DynamsoftEnums as Dynamsoft } from "./Dynamsoft.Enum";
2
+ import { WebTwainIO } from "./WebTwain.IO";
3
+
4
+ export interface WebTwainBuffer extends WebTwainIO {
5
+ /**
6
+ * Return the current deviation of the pixels in the image.
7
+ */
8
+ readonly BlankImageCurrentStdDev: number;
9
+ /**
10
+ * Return or set the standard deviation of the pixels in the image.
11
+ */
12
+ BlankImageMaxStdDev: number;
13
+ /**
14
+ * Return or set the dividing line between black and white. The default value is 128.
15
+ */
16
+ BlankImageThreshold: number;
17
+ /**
18
+ * Return or set how much physical memory is allowed for storing images currently loaded in Dynamic Web TWAIN. Once the limit is reached, images will be cached on the hard disk.
19
+ */
20
+ BufferMemoryLimit: number;
21
+ /**
22
+ * Remove all tags from the specified image.
23
+ * @param index Specify the image.
24
+ */
25
+ ClearImageTags(index: number): boolean;
26
+ /**
27
+ * Return or set the current index of image in the buffer.
28
+ */
29
+ CurrentImageIndexInBuffer: number;
30
+ /**
31
+ * Filter images by the specified tag.
32
+ * @param tag The tag used as the filter.
33
+ */
34
+ FilterImagesByTag(tag: string): boolean;
35
+ /**
36
+ * Return the pixel bit depth of the specified image.
37
+ * @param index Specify the image.
38
+ */
39
+ GetImageBitDepth(index: number): number;
40
+ /**
41
+ * Return the height (in pixels) of the specified image.
42
+ * @param index Specify the image.
43
+ */
44
+ GetImageHeight(index: number): number;
45
+ /**
46
+ * Return the internal URL of the specified image. If width and height are not specified,
47
+ * you get the original image, otherwise you get the image with specified width or height
48
+ * while keeping the same aspect ratio. The returned string is like this
49
+ * 'dwt://dwt_trial_13000404/img?id=306159652&index=0&t=1502184632022'.
50
+ * @param index Specify the image.
51
+ * @param width the width of the image, it must be 150 or bigger
52
+ * @param height the height of the image, it must be 150 or bigger
53
+ */
54
+ GetImagePartURL(index: number, width?: number, height?: number): string;
55
+ /**
56
+ * Calculate the size in bytes of the specified image assuming it's resized to the given dimensions.
57
+ * @param index Specify the image.
58
+ * @param width Specify the width.
59
+ * @param height Specify the height.
60
+ */
61
+ GetImageSize(index: number, width: number, height: number): number;
62
+ /**
63
+ * Calculate the size in bytes of the specified image assuming an expected file type.
64
+ * @param index Specify the image.
65
+ * @param type Sepcify the expected file type.
66
+ */
67
+ GetImageSizeWithSpecifiedType(index: number, type: Dynamsoft.EnumDWT_ImageType | number): number;
68
+ /**
69
+ * Return the direct URL of the specified image, if width or height is set to -1,
70
+ * you get the original image, otherwise you get the image with specified width or
71
+ * height while keeping the same aspect ratio.
72
+ * @param index Specify the image.
73
+ * @param width Specify the width.
74
+ * @param height Specify the height.
75
+ */
76
+ GetImageURL(index: number, width?: number, height?: number): string;
77
+ /**
78
+ * Return the width (in pixels) of the specified image.
79
+ * @param index Specify the image.
80
+ */
81
+ GetImageWidth(index: number): number;
82
+ /**
83
+ * Return the horizontal resolution of the specified image.
84
+ * @param index Specify the image.
85
+ */
86
+ GetImageXResolution(index: number): number;
87
+ /**
88
+ * Return the vertical resolution of the specified image.
89
+ * @param index Specify the image.
90
+ */
91
+ GetImageYResolution(index: number): number;
92
+ /**
93
+ * [Deprecation] Return an index from the selected indices array. Read SelectedImagesIndices instead.
94
+ * [Alternative] Read SelectedImagesIndices instead.
95
+ * @param indexOfIndices Specify the index of the specified image.
96
+ */
97
+ GetSelectedImageIndex(indexOfIndices: number): number;
98
+ /**
99
+ * Calculate the size in bytes of all selected images assuming an expected file type.
100
+ * @param type Sepcify the expected file type.
101
+ */
102
+ GetSelectedImagesSize(type: Dynamsoft.EnumDWT_ImageType | number): number;
103
+ /**
104
+ * Return the skew angle of the specified image.
105
+ * @param index Specify the image.
106
+ * @param successCallback A callback function that is executed if the request succeeds.
107
+ * @param failureCallback A callback function that is executed if the request fails.
108
+ * @argument angle The skew angle.
109
+ * @argument errorCode The error code.
110
+ * @argument errorString The error string.
111
+ */
112
+ GetSkewAngle(
113
+ index: number,
114
+ successCallback?: (
115
+ angle: number) => void,
116
+ failureCallback?: (
117
+ errorCode: number,
118
+ errorString: string) => void
119
+ ): number | void;
120
+ /**
121
+ * Return the skew angle of the specified rectangle on the specified image.
122
+ * @param index Specify the image.
123
+ * @param left The x-coordinate of the upper-left corner of the rectangle.
124
+ * @param top The y-coordinate of the upper-left corner of the rectangle.
125
+ * @param right The x-coordinate of the lower-right corner of the rectangle.
126
+ * @param bottom The y-coordinate of the lower-right corner of the rectangle.
127
+ * @param successCallback A callback function that is executed if the request succeeds.
128
+ * @param failureCallback A callback function that is executed if the request fails.
129
+ * @argument angle The skew angle.
130
+ * @argument errorCode The error code.
131
+ * @argument errorString The error string.
132
+ */
133
+ GetSkewAngleEx(
134
+ index: number,
135
+ left: number,
136
+ top: number,
137
+ right: number,
138
+ bottom: number,
139
+ successCallback?: (
140
+ angle: number) => void,
141
+ failureCallback?: (
142
+ errorCode: number,
143
+ errorString: string) => void
144
+ ): number | void;
145
+ /**
146
+ * Return how many images are held in the buffer
147
+ */
148
+ readonly HowManyImagesInBuffer: number;
149
+ /**
150
+ * Return or set whether the feature of disk caching is enabled.
151
+ */
152
+ IfAllowLocalCache: boolean;
153
+ /**
154
+ * Return the imageId of an image specified by the index.
155
+ * @param index The index of the image.
156
+ */
157
+ IndexToImageID(index: number): number;
158
+ /**
159
+ * Return the index of an image specified by the imageId.
160
+ * @param imageId The imageId of the image.
161
+ */
162
+ ImageIDToIndex(imageId: number): number;
163
+ /**
164
+ * Check whether the specified image is blank.
165
+ * @param index Specify the image.
166
+ */
167
+ IsBlankImage(index: number): boolean;
168
+ /**
169
+ * [Deprecation] Detect whether a certain area on an image is blank.
170
+ * [Alternative] Use IsBlankImage or IsBlankImageExpress instead.
171
+ * @param index Specify the image.
172
+ * @param left The x-coordinate of the upper-left corner of the rectangle.
173
+ * @param top The y-coordinate of the upper-left corner of the rectangle.
174
+ * @param right The x-coordinate of the lower-right corner of the rectangle.
175
+ * @param bottom The y-coordinate of the lower-right corner of the rectangle.
176
+ * @param bFuzzyMatch Specify whether use fuzzy matching when detecting.
177
+ */
178
+ IsBlankImageEx(index: number, left: number, top: number, right: number, bottom: number, bFuzzyMatch: boolean): boolean;
179
+ /**
180
+ * Check whether the specified image is blank.
181
+ * @param index Specify the image.
182
+ */
183
+ IsBlankImageExpress(index: number): boolean;
184
+ /**
185
+ * Return or set how many images can be held in the buffer.
186
+ */
187
+ MaxImagesInBuffer: number;
188
+ /**
189
+ * Change the position of an image in the buffer.
190
+ * @param from Specify the original position by index.
191
+ * @param to Specify the target position by index.
192
+ */
193
+ MoveImage(from: number, to: number): boolean;
194
+ /**
195
+ * Remove all images in the buffer.
196
+ */
197
+ RemoveAllImages(): boolean;
198
+ /**
199
+ * Remove the selected images in the buffer.
200
+ */
201
+ RemoveAllSelectedImages(): boolean;
202
+ /**
203
+ * Remove the specified image.
204
+ * @param index Specify the image.
205
+ */
206
+ RemoveImage(index: number): boolean;
207
+ /**
208
+ * Select all images and return the indices.
209
+ */
210
+ SelectAllImages(): number[];
211
+ /**
212
+ * [Deprecation] Return how many images are selected.
213
+ * [Alternative] Read the length of SelectedImagesIndices instead.
214
+ */
215
+ SelectedImagesCount: number;
216
+ /**
217
+ * Return the indices of the selected images.
218
+ */
219
+ readonly SelectedImagesIndices: number[];
220
+ /**
221
+ * Select the specified images.
222
+ * @param indices Specify one or multiple images.
223
+ */
224
+ SelectImages(indices: number[]): boolean;
225
+ /**
226
+ * Specify a aspect ratio to be used when selecting a rectangle on an image.
227
+ */
228
+ SelectionRectAspectRatio: number;
229
+ /**
230
+ * Set a default tag for newlay acquired images.
231
+ * @param tag Specifies the tag.
232
+ */
233
+ SetDefaultTag(tag: string): boolean;
234
+ /**
235
+ * [Deprecation] You can use the method to select images programatically.
236
+ * [Alternative] Use SelectImages() or SelectAllImages() instead.
237
+ * @param indexOfIndices The index of an array that holds the indices of selected images.
238
+ * @param index The index of an image that you want to select.
239
+ */
240
+ SetSelectedImageIndex(indexOfIndices: number, index: number): boolean;
241
+ /**
242
+ * Exchange the positions of two images.
243
+ * @param index1 Specify the 1st image.
244
+ * @param index2 Specify the 2nd image.
245
+ */
246
+ SwitchImage(index1: number, index2: number): boolean;
247
+ /**
248
+ * Add a tag to specified images.
249
+ * @param indices Specifies images to be tagged.
250
+ * @param tag Specify the tag.
251
+ */
252
+ TagImages(indices: number[], tag: string): boolean;
253
+ /**
254
+ * Rename Tag.
255
+ * @param oldTag Old tag name.
256
+ * @param newTag Specify the new tag name.
257
+ */
258
+ RenameTag(oldTag: string, newTag: string): boolean;
259
+ }