QB64 Phoenix Edition
image unroller - Printable Version

+- QB64 Phoenix Edition (https://staging.qb64phoenix.com)
+-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3)
+---- Forum: Programs (https://staging.qb64phoenix.com/forumdisplay.php?fid=7)
+---- Thread: image unroller (/showthread.php?tid=351)



image unroller - James D Jarvis - 05-05-2022

A simple little image unroller that does an image reveal like a scroll being unrolled. Someone posted an example in a facebook group in their dialect of basic asking if other forms of basic could handle it. So I whipped this up. 

Code: (Select All)
' Picture unroller
img& = _LoadImage("hexmap0001.jpg", 32) 'your image here
w = _Width(img&)
h = _Height(img&)
sc& = _NewImage(w, h, 32)
Screen sc&
Cls: s = 3
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



RE: image unroller - James D Jarvis - 05-05-2022

The image I used. Looks cooler with a map of some sort.

[Image: Hexmap0001.jpg]


RE: image unroller - euklides - 05-06-2022

Nice !
Would be also interesting with a continuous horizontal move ???


RE: image unroller - James D Jarvis - 05-06-2022

Kinda like a tapestry unrolling?