diff --git a/types/dwt/Dynamsoft.d.ts b/types/dwt/Dynamsoft.d.ts index 4555d11cad..6ab4dcb829 100644 --- a/types/dwt/Dynamsoft.d.ts +++ b/types/dwt/Dynamsoft.d.ts @@ -2999,6 +2999,19 @@ interface WebTwain { */ HTTPUpload(url: string, indices: number[], enumImageType: EnumDWT_ImageType, dataFormat: EnumDWT_UploadDataFormat, asyncSuccessFunc: (httppostresponsestring: string) => void, asyncFailureFunc: (errorCode: number, errorString: string, httppostresponsestring: string) => void): boolean; + /** + * Uploads the images specified by the indices to the HTTP server. + * @method WebTwain#HTTPUpload + * @param {string} url the url where the images are sent in a POST request. + * @param {Array} indices indices specifies which images are to be uploaded. + * @param {EnumDWT_ImageType} enumImageType the image format in which the images are to be uploaded. + * @param {EnumDWT_UploadDataFormat} dataFormat whether to upload the images as binary or a base64-based string. + * @param {string} fileName the name of the image to be uploaded. + * @param {function} asyncSuccessFunc the function to call when the upload succeeds. Please refer to the function prototype OnSuccess. + * @param {function} asyncFailureFunc the function to call when the upload fails. Please refer to the function prototype OnFailure. + */ + HTTPUpload(url: string, indices: number[], enumImageType: EnumDWT_ImageType, dataFormat: EnumDWT_UploadDataFormat, fileName: string, asyncSuccessFunc: (httpPostResponseString: string) => void, asyncFailureFunc: (errorCode: number, errorString: string, httpPostResponseString: string) => void): boolean; + /** * Uploads all images in the buffer to the HTTP server through the HTTP Post method as a Multi-Page TIFF. * @method WebTwain#HTTPUploadAllThroughPostAsMultiPageTIFF @@ -3781,18 +3794,59 @@ interface WebTwain { */ UnregisterEvent(name: string, evt: object): boolean; + /** + * Tag specified images + * @method WebTwain#TagImages + * @param {number[]} aryImageIndices The indices of the images to tag + * @param {string} tagName specifies a tag + * @return {boolean} + */ TagImages(aryImageIndices: number[], tagName: string): boolean; + /** + * Sets a default tag that's applied to newly acquired images + * @method WebTwain#SetDefaultTag + * @param {string} tagName specifies a tag + * @return {boolean} + */ SetDefaultTag(tagName: string): boolean; + /** + * Clear the tags from the specified image + * @method WebTwain#ClearImageTags + * @param {number} sImageIndex specified a image + */ ClearImageTags(sImageIndex: number): boolean; + /** + * Specifies a tag and use it to filter images + * @method WebTwain#FilterImagesByTag + * @param {string} tagName specifies a tag + * @return {boolean} + */ FilterImagesByTag(tagName: string): boolean; - + + /** + * Selects all images + * @method WebTwain#SelectAllImages + * @return {boolean} + */ SelectAllImages(): boolean; - + + /** + * Inverts the color of the pixels of the specified image + * @method WebTwain#Invert + * @param {number} sImageIndex specifies an image + * @return {boolean} + */ Invert(sImageIndex: number): boolean; - + + /** + * Converts the specified image to black & white + * @method WebTwain#ConvertToBW + * @param {number} sImageIndex specifies an image + * @return {boolean} + */ ConvertToBW(sImageIndex: number): boolean; /*ignored