Resize image's script doesn't work when much files to process

Hi,

I got a script to resize images in a directory.
The script resizes the images 3 times (640480, 12896 and 240*168)
The script works fine when there are not so much files to resize.
But when, I think a number of 20 files, must be resized, the script just returns a white page whitout any error.

What can be the problem?

Thx in advance!