Slow scrolling after twain acquire

Discussions about document viewing.
Post Reply
kylex
Posts: 7
Joined: Sat Jul 28, 2007 11:39 pm

Slow scrolling after twain acquire

Post by kylex » Sun Jul 29, 2007 10:33 pm

Hi, I'm a user of the demo version in Access 2003 VBA. I noticed that after twain acquire scrolling speed is really slow than after loading an image from a file (the same picture previously scanned too). The code I use is the following:

Code: Select all

    Dim nImageID As Long
    
    GdPicture.TwainSelectSource (Me.Hwnd)
    GdPicture.TwainOpenDefaultSource
    GdPicture.TwainSetErrorMessage (True)
    GdPicture.TwainSetHideUI (False)
    nImageID = GdPicture.CreateImageFromTwain(Me.Hwnd)
    GdPicture.TwainCloseSourceManager (Me.Hwnd)
  
    If nImageID <> 0 Then
       gdViewer.ClosePicture
       gdViewer.DisplayFromImageRef (nImageID)
    End If

For my project I really need fast scrolling after twain acquire, because I execute it on old PCs. Normal scrolling is ok, but when I load an image from scanner, application becomes not very usable. Is that an issue of the demo version, a bug, or a my mistake? Thanks.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Post by Loïc » Thu Aug 02, 2007 9:41 am

Hi,

Did you try the last release, there is an optimization for image scrolling.

Else, it is possible that your application is using too much memory. You can try to save the image as temporary file, close it and use a DisplayFromFile() call to show it.


Best regards,

Loïc Carrère

kylex
Posts: 7
Joined: Sat Jul 28, 2007 11:39 pm

Post by kylex » Thu Aug 09, 2007 12:02 am

Hi, I discovered that slow scrolling was caused by CPU-intensive interpolation mode: using nearest neighbor improved a lot the scrolling speed. However, even when a fast kind of interpolation is selected, randomly (zooming or loading various pictures), scrolling becomes slow again as a slow interpolation was used, and picture is viewed in higher quality than it should be. Setting interpolation mode explicitly, every time a picture is loaded, didn't help.
It seems that gdViewer does not always apply the interpolation mode set with the property InterpolationMode and randomly falls back to a default CPU-intensive mode.
However I noticed that when this happens, if i set ZoomMode to Zoom100 (and only for this value) the problem disappears, scrolling is fast again and picture is rendered in low quality as it should be.
The bug is particularly evident when I execute the Rotate90 method or after twain acquire, as described previously: in this cases the property InterpolationMode is always ignored and scrolling and viewing is always becomes CPU-intensive; setting ZoomMode to Zoom100 doesn't change anything.
Thanks for the answer.

kylex
Posts: 7
Joined: Sat Jul 28, 2007 11:39 pm

Post by kylex » Fri Aug 17, 2007 6:10 pm

Hi, if I buy a license, can I be sure that you'll fix this bug? It's very important for my application. Thanks

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Post by Loïc » Mon Aug 20, 2007 3:08 pm

Hi,

This behaviour will be solved into the next release.

Best regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest