isBlankImage method - calling via Javascript

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

Moderator: Alex

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

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
Alex
Site Admin
Posts: 2307
Joined: Thu Jul 10, 2008 2:21 pm

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:

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