On 2005-06-08 17:14:58 -0500 (Wed, Jun), Michael Sullivan wrote:
> Each time I offload photos from my camera I create a directory for those
> photos and name it the date I offloaded them in mmddyy format.  I then
> create a list of files in that directory (ex, if I offloaded pix today I
> would have called the directory 060805 and the list list060805.txt.
> There is also a file called list.txt that contains each of the list
> filenames on its own line.  My VB program (and now my PHP script) opens
> list.txt and reads in a list filename and passes it to a subroutine
> which in turn opens the list filename and formats an HTML page with the
> 100x100 photos organized into tables by date.  It then returns this page
> to the web browser requesting it.
[...]
> If PHP is a server side scripting language, then why is mozilla
> requiring so much of my RAM memory and hard drive?  Shouldn't all the
> work of generating the page be being done on bullet???

You did not said that you prepare the 'thumbnails' - small versions of
the images. Thus, if you generate a page that includes 10 000 images (I
suppose that they are really large images) then the client has to
download all these images and shrink them for display.
It will consume a lot of disk space, a lot of memory, a lot of CPU
cycles, a lot of bandwidth.

You should create smaller versions of your photos, for example by using
the 'convert' program from ImageMagick package:

 mkdir thu; \
 for x in *.jpg; do \
   convert "$x" -thumbnail 200x200 -verbose thu/thu_"$x"; \
 done

and then, in the generated HTML you should make something like:

<a href="image.png">
<img src="thu/thu_image.png" height="200" width="200" alt="image.png" />
</a>

HTH.

-- 
$ ls -lart
/bin/ls: you must be root to use LART

Attachment: pgpiW6BPQlBon.pgp
Description: PGP signature

Reply via email to