Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Memory issues

Status
Not open for further replies.

dbrb2

Instructor
Jul 19, 2004
121
GB
Hi,

I've made myself a photo album generator - it creates thumbnails and stores them in a directory if a thumbnails directory is not already present, then displays the results with the thumbs linked to the originals, with display paramters based on a config file.

During the creation of thumbnails, I first trim the original to a square, then resize to make a thumbnail. I use ImageDestroy
to (attempt to) ensure memory problems are not encountered.

In ths way, I thought that the memory requirements for 1 thumbnail would be the same as for 100.

However, when trying the system on a directory of 200 images I was forced to raise the memory limit in the php.ini file to ensure all thumbs were succesfully created. Any idea why this might be?

The code is a bit of a mess at this stage, but is online at:



Cheers,



Ben
 
...Well, sorted it. It turns out it wasn't memory problems, which is nice, but just how long the script was allowed to run for - another setting in the .ini file. More files---> takes longer, and it was timing out


Cheers,


Ben
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top