Page 1 of 1

isBlankImage method - calling via Javascript

Posted: Thu Jan 07, 2010 3:16 pm
by McGinty
VintaSoft,

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??

Cheers,

McG

Re: isBlankImage method - calling via Javascript

Posted: Mon Jan 11, 2010 3:59 pm
by Alex
Hello,

Version 6.0.3.1 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.") 
else 
{ 
    if (VSTwain1.NoiseLevel == 100) 
        alert("Image is not blank. " + VSTwain1.ErrorString) 
    else 
        alert("Image is not blank. Noise level is " + VSTwain1.NoiseLevel + "%") 
}
Best regards, Alexander