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 » Thu Jan 07, 2010 3:16 pm

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: 1474
Joined: Thu Jul 10, 2008 2:21 pm

Re: isBlankImage method - calling via Javascript

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

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

Who is online

Users browsing this forum: Bing [Bot] and 1 guest