VintaSoft Twain .NET SDK Discussions

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

Board index < VintaSoft Twain < VintaSoft Twain .NET SDK Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

isBlankImage method - calling via Javascript



isBlankImage method - calling via Javascript

Post 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

Post 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:
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


Page 1 from 1: 1