05-09-2022, 05:50 PM
Picture unroller. Author James D Jarvis. Found in the forum.
8.5x seconds : program compiled with qb64 -O3
8.5x seconds : program compiled with original qb64
Tested with an image with a resolution of 1024x768.
no gain with the use of _PutImage. surprising.
8.5x seconds : program compiled with qb64 -O3
8.5x seconds : program compiled with original qb64
Tested with an image with a resolution of 1024x768.
no gain with the use of _PutImage. surprising.
Code: (Select All)
' James D Jarvis : Picture unroller
img& = _LoadImage("pic3.jpg", 32) 'your image here
w = _Width(img&)
h = _Height(img&)
sc& = _NewImage(w, h, 32)
Screen sc&
_Delay 0.1
_ScreenMove _Middle
Cls: s = 3
start = Timer(.001)
For yc = 0 To h Step s:
_Limit 30
_PutImage (0, 0), img&, sc&, (0, 0)-(w, yc)
_PutImage (0, yc - 6)-(w, yc + 6), img&, sc&, (0, yc)-(w, yc + 3)
Next yc
Print Timer(.001) - start; "seconds"