displaying numerous large image files quickly

Klaus on-rev klaus at major.on-rev.com
Mon Feb 22 10:02:49 CST 2010


Hi Mark,

> I'm working on a simple game of concentration for the kids I teach.  
> 
> I have 24 small image rectangles grouped on a card that are populated in a repeat loop which sets their fileNames to line x of a list of filenames held in a variable.  These files can be large images.
> 
> lock screen
> put the seconds into vSecs
> repeat with x = 1 to 24
>    set the filename of image x of group "imageGroup" to line x of vPopulate
> end repeat
> unlock screen
> put (the seconds - vSecs)
> 
> The above takes 5 seconds (which is close to an eternity...)
> 
> Is there a faster way to make this happen, or should I simply make a progress bar and not worry about it?  

did you try to use QuickTime player objectys, if that is an option?

I remember that I made some test a couple of years a go and the winner was a QT player, here my results from 2006.
I used a Rev image object, Trevors Enhanced QuickTime Extrenal saved I pulled an image in the desired size to disk
and I set the filename of a Rev image.

The results are quite impressive!
Please remember that I do the tests on my "ancient" G4 with 1 Ghz but 1 GB RAM :-)

##############################
I set the filename of a Rev image, computed the correct size from the "formatted dimensions" and adjusted heigth/width accordingly, same for players.
Dimensions are in pixels, times in milliseconds.

Image dimensions: 2560*1920
Thumbnailsize: 60*60
qtsnap2var: 572
Rev img: 1786
Player: 78 !!!!

Image dimensions: 2560*1920
Thumbnailsize: 100*100
qtsnap2var: 585
Rev img: 1822
Player: 85

Image dimensions: 2560*1920
Thumbnailsize: 150*150
qtsnap2var: 563
Rev img: 1896
Player: 75

Image dimensions: 2560*1920
Thumbnailsize: 200*200
qtsnap2var: 585
Rev img: 1822
Player: 79

Image dimensions: 2560*1920
Thumbnailsize: 300*300
qtsnap2var: 780
Rev img: 1924
Player: 76

Image dimensions: 3440*2580
Thumbnailsize: 150*150
qtsnap2var: 742
Rev img: 2991
Player: 74
##############################

Hope this helps!

> Thanks
> Mark

Best

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major.on-rev.com




More information about the use-livecode mailing list