isBlankImage method - calling via Javascript

Questions, comments and suggestions concerning VintaSoft Twain .NET SDK.

Moderator: Alex

Post Reply
Posts: 1
Joined: Thu Jan 07, 2010 3:08 pm

isBlankImage method - calling via Javascript

Post by McGinty » Thu Jan 07, 2010 3:16 pm


I’m having an issue whereby I can’t utilise the isBlankImage function in VintasoftTwain.NET because I cant pass by reference in Javascript. We are using Javascript to call the Vintasoft TWAIN.NET DLL methods but because this function requires that the currentNoise parameter is passed by reference, we cant do this in Javascript as primitive variables are passed by value.

Is there a workaround for this that you are aware of? Is there any way to call the isBlankImage function from javascript??



Site Admin
Posts: 1565
Joined: Thu Jul 10, 2008 2:21 pm

Re: isBlankImage method - calling via Javascript

Post by Alex » Mon Jan 11, 2010 3:59 pm


Version of VintaSoftTwain.NET Library has new property - the NoiseLevel property which allows to get noise level in the image in JavaScript. Here is a snippet of code:

Code: Select all

var currentNoiseLevel = 0 // dummy variable
if (VSTwain1.IsBlankImage(0, 0.01, currentNoiseLevel) == true) 
    alert("Image is blank.") 
    if (VSTwain1.NoiseLevel == 100) 
        alert("Image is not blank. " + VSTwain1.ErrorString) 
        alert("Image is not blank. Noise level is " + VSTwain1.NoiseLevel + "%") 
Best regards, Alexander

Post Reply