Using series of PNG files as animation problems

Jun 6 2009 6:54 PM

Hi,
I'm trying to write application where I use series of PNG files for animations. I created control which loads Images from file into ArrayList, and then on specified timer interval I change picture that I want to display. I'm using 1280x720 PNGs.
I have 2 problems here:
1) My PNG is around 300KB, and when I execute Image.FromFile("my.png") memory of my process is increased for 4MB. So, if I load 30 pictures, memory will grow to around 130MBs and the problem is that I have to keep lot of images loaded into memory since I'm using it constantly during execution time.
2) performances of DrawImage functions are quite bad and I cannot get proper speed (if I need 25 frames per second for example)
Does anyone have some suggestions how to solve this?
Thnx in advance!

Answers (1)