scrolling slow when viewing image first time
scrolling slow when viewing image first time
Ok, I got help before on getting my image to scroll to the top left position by doing the following:
gdviewer1.SetZoomWidth
gdviewer1.LockScreen = True
gdviewer1.DisplayFromFile(myImage)
gdviewer1.SetHVScrollBarPosition(0,0)
gdviewer1.LockScreen = False
gdviewer1.Redraw()
I'm having complaints that the scroll is too small so I saw in the forum I need to set the scrollsmallchange. It does work but I've notice a behavior not sure how to fix.
Whenever the code listed above is executed, when I scroll it's slower and jerky. But if I zoom on the screen, then try the scrollbars it works great. I can't figure out why that first time it's so slow.
Any ideas?
gdviewer1.SetZoomWidth
gdviewer1.LockScreen = True
gdviewer1.DisplayFromFile(myImage)
gdviewer1.SetHVScrollBarPosition(0,0)
gdviewer1.LockScreen = False
gdviewer1.Redraw()
I'm having complaints that the scroll is too small so I saw in the forum I need to set the scrollsmallchange. It does work but I've notice a behavior not sure how to fix.
Whenever the code listed above is executed, when I scroll it's slower and jerky. But if I zoom on the screen, then try the scrollbars it works great. I can't figure out why that first time it's so slow.
Any ideas?
Hi,
Sorry for the late.
With the last beta-release https://www.gdpicture.com/ressources/betas/
You can replace your code
by this one
I think it will increase your scroll speed.
Best regards,
Loïc Carrère
Sorry for the late.
With the last beta-release https://www.gdpicture.com/ressources/betas/
You can replace your code
Code: Select all
gdviewer1.SetZoomWidth
gdviewer1.LockScreen = True
gdviewer1.DisplayFromFile(myImage)
gdviewer1.SetHVScrollBarPosition(0,0)
gdviewer1.LockScreen = False
gdviewer1.Redraw()
by this one
Code: Select all
gdViewer1.ImageAlignment = ImagePositionTopLeft
gdViewer1.InterpolationMode = 1
I think it will increase your scroll speed.
Best regards,
Loïc Carrère
Ok, I tried out the beta version.
This is what I currently have:
gdviewer1.SetZoomWidth
gdViewer1.ImageAlignment = ImagePositionTopLeft
gdviewer1.DisplayFromFile(myImage)
I didn't do the interpolationmode because my documents weren't as clear. What I did notice is if use the SetZoomWidth then that seems to be what's slowing it down. If I leave that out then the scrolling is great. Unfortunately I really need the SetZoomWidth option to set my document to width of the control. Any ideas?
And thank you for the help!
This is what I currently have:
gdviewer1.SetZoomWidth
gdViewer1.ImageAlignment = ImagePositionTopLeft
gdviewer1.DisplayFromFile(myImage)
I didn't do the interpolationmode because my documents weren't as clear. What I did notice is if use the SetZoomWidth then that seems to be what's slowing it down. If I leave that out then the scrolling is great. Unfortunately I really need the SetZoomWidth option to set my document to width of the control. Any ideas?
And thank you for the help!
Hi,
To increase the viewer speed you can try to force your applicaiton tu use the gdiplus.dll which are include in the gdpicture pro package:
Loïc Carrère
To increase the viewer speed you can try to force your applicaiton tu use the gdiplus.dll which are include in the gdpicture pro package:
Best regards,- Creates an empty ApplicationName.exe.local file in the same directory as your application. (Use your applicaiton name instead ApplicationName).
- Copy to the gdiplus.dll of the redist forder into this same directory.
Loïc Carrère
Ok, here's the problem. I can recreate this in vb6.
If I have the above code it will scroll slowly:
Me.gdViewer1.LockScreen = True
Me.gdViewer1.DisplayFromFile ("c:\images\test.tif")
Me.gdViewer1.ImageAlignment = ImagePositionTopLeft
Me.gdViewer1.SetZoomWidth
Me.gdViewer1.LockScreen = False
Me.gdViewer1.Redraw
If I have the code below it will scroll the way I want it but I get that blinking effect because I load the image then I change the way to view it after it's loaded.
Me.gdViewer1.DisplayFromFile ("c:\images\test.tif")
Me.gdViewer1.LockScreen = True
Me.gdViewer1.ImageAlignment = ImagePositionTopLeft
Me.gdViewer1.SetZoomWidth
Me.gdViewer1.LockScreen = False
Me.gdViewer1.Redraw
I didn't know if there's a way to fix this or any suggestions on doing it differently or is the only way to do it by your previous post? The viewer speed is ok, it's just the scrolling.
Maybe someone else has run across this??
If I have the above code it will scroll slowly:
Me.gdViewer1.LockScreen = True
Me.gdViewer1.DisplayFromFile ("c:\images\test.tif")
Me.gdViewer1.ImageAlignment = ImagePositionTopLeft
Me.gdViewer1.SetZoomWidth
Me.gdViewer1.LockScreen = False
Me.gdViewer1.Redraw
If I have the code below it will scroll the way I want it but I get that blinking effect because I load the image then I change the way to view it after it's loaded.
Me.gdViewer1.DisplayFromFile ("c:\images\test.tif")
Me.gdViewer1.LockScreen = True
Me.gdViewer1.ImageAlignment = ImagePositionTopLeft
Me.gdViewer1.SetZoomWidth
Me.gdViewer1.LockScreen = False
Me.gdViewer1.Redraw
I didn't know if there's a way to fix this or any suggestions on doing it differently or is the only way to do it by your previous post? The viewer speed is ok, it's just the scrolling.
Maybe someone else has run across this??
Thanks Loic! I will have to try that out when it's ready.
My issue was in MOST situations I load the image and use SetZoomWidth. It would scroll slow but then if I zoomed on the image it would then be fast and if I set it back to the SetZoomWidth it would be fast too. It seemed to be just when viewing the image the first time (and related tot he locking).
To get around it I first hide my viewer, then I zoom at 50%, open the file (DisplayFromFile), call SetZoomWidth, then unhide. I had to hide the control to not see the image resizing. I couldn't use the lock because when I had that it the code, the scrolling would be slow. So that's how I got around it for now.
Thanks, I'll watch for the update.
My issue was in MOST situations I load the image and use SetZoomWidth. It would scroll slow but then if I zoomed on the image it would then be fast and if I set it back to the SetZoomWidth it would be fast too. It seemed to be just when viewing the image the first time (and related tot he locking).
To get around it I first hide my viewer, then I zoom at 50%, open the file (DisplayFromFile), call SetZoomWidth, then unhide. I had to hide the control to not see the image resizing. I couldn't use the lock because when I had that it the code, the scrolling would be slow. So that's how I got around it for now.
Thanks, I'll watch for the update.
Hi,
The last release is available:
GdViewer Pro:
https://www.gdpicture.com/products/gdvie ... ctivex.php
GdViewer STD:
https://www.gdpicture.com/products/gdvie ... ctivex.php
https://www.gdpicture.com/references/gdv ... ation.html
Best regards,
Loïc Carrère
The last release is available:
GdViewer Pro:
https://www.gdpicture.com/products/gdvie ... ctivex.php
GdViewer STD:
https://www.gdpicture.com/products/gdvie ... ctivex.php
Yes, the image loading time is a bit extended. However you can turn off the scroll optimization using the new ScrollOptimization propertie:Just curious, will there be any penalty for setting the scroll optimization?
https://www.gdpicture.com/references/gdv ... ation.html
Best regards,
Loïc Carrère
Who is online
Users browsing this forum: No registered users and 1 guest