I am developing a windows 8 app which has a digital clock. I am switching images for numbers in the clock each second. And am retrieving these images from within the project assets folder. But i still think retrieving the image every second is making it heavy on the CPU.
One way i could think to reduce cpu load was toggling the visibility of all the number images. But that makes for a really messy code as i have a lot of images(18).
Any other ideas on how i can reduce the load on CPU?
Thanks
What Roy meant by ‘In Memory’ is not assets folder. Load all images into an image array during the startup of the application. Then you can access each image from that array which will be faster than accessing it everytime from assets folder.
A better approach, but slightly more complicated might be to combine all images to 1 large image in photoshop or so. Then draw the appropriate part of the image for showing each second.
This technique is used in games generally.
http://en.wikipedia.org/wiki/Sprite_(computer_graphics)
http://spritedatabase.net/tutorial_sheet.php