The Gallery (v2)

Posted in Images, Web Development on October 21st, 2009

I got around to working more on the gallery that I've been putting together. Currently, it's hosted on my home server, mostly for ease of modifications but also because the thumbnail creation requires php to not timeout in the default amount of time (I believe 30 seconds).

So, what's so great about the script? Well, I'm actually proud of making it myself. The script has a few key features:

  • Just upload a new directory to a defined image_gallery directory and it'll automatically be displayed on the gallery page
  • The icon for each album is automatic. It uses the icon.png file that is placed in the directory with the new images
  • The "rebuild script" will create the thumbnails for each album
  • The "rebuild script" will also extract the exif data from the images (currently, only date, title, description, camera type (not displayed), and apeture (not displayed)
  • If no exif data, the filename is used as the title of the image

Unfortunately, there are some minor "limitations" to how I'm doing things but I don't think they're a problem

  • Limited to jpg files. This is more by design and wouldn't be too tough to fix
  • Using the GD library to create the thumbnails takes a bit of time. It took about a minute to complete the thumbnail/exif-file creation. Unfortunately, php by default will stop a script from running after 30 seconds. An easy fix if you have access to the php configuration file but not all hosts will allow modification of it
  • The album icon is not created automatically. I'm considering a way to do this but it would probably be the toughest part of the script
  • The sorting of the images and albums is done by filename. I could probably find a different way to sort but I like the current method. I leave my images with their default names (DSC_0001.jpg, DSC_0002.jpg, etc) and the album folder names always start with the date (20091021 - Something).

Who knows if I'll put the script online for others to use? It was mostly just created from boredom. I'll have to think about it.

Check Out The Gallery

Leave a Reply

Mail (will not be published) (required)