How can I know the size of memory used by Dynamic Web TWAIN?

Dynamic Web TWAIN stores the scanned images in DIB format in the physical memory (as part of the memory occupied by the browser). You can use the method GetSelectedImagesSize to get the total size that the scanned images have occupied. Below is a code snippet for your reference:

Javascript Code

function checkMemory() {
    if (DWObject) {
        if (DWObject.HowManyImagesInBuffer == 0)
            alert("There is no image in buffer.");
        else {
            var n = DWObject.HowManyImagesInBuffer;
            DWObject.SelectedImagesCount = n;
            for (var i = 0; i < n; i++) 
                DWObject.SetSelectedImageIndex(i, i);