WebGalleryGenerate

An applescript based application for quickly creating web galleries of JPEGs. Also, the php script which the applescript app generates. The index.php file creates the thumbnails and displays the thumbnails and detail pages.

This script started as a simple way to display images, and has grown gradually into a way to process the images, and display them. This organic growth has made the script large and inelegant, so it could use a rewrite, but that may not happen any time soon. The applescript works on Apple OS X (10.2 jaguar, 10.3 panther and 10.4 tiger currently), and the php works (at least to some extent) on any web server running php 4 or later.

Here is a text file with the code for the WebGalleryGenerate php file. It uses ImageMagick to generate thumbnails and resize images. It can also generate thumbnails with php's built in gd based image handling, but I haven't been testing that much recently, so your mileage may vary.

Here is a .dmg of WebGalleryGenerate. It includes the script application, an installer for the jpeg-6b library (which allows for lossless jpeg rotation) and an installer called php_enable, which should enable php on the apache installation which is the "Personal Web Sharing" on Mac OS X. Current version 0.25
WebGalleryGenerate25.dmg.gz 348K

Requirements to use the application on OS X:
1. Turn on Personal Web Sharing if it's not already on
2. Download and install the ImageMagick command line tool. I recommend Marc Liyanage's excellent collection of Unix utilities at: http://www.entropy.ch/software/macosx/#imagemagick if you have OS X 10.2 or 10.3, or you can try an ImageMagick 6.3 installer I created for OS X 10.4.
3. Download the WebGalleryGenerate dmg above and run the php_enable.pkg to enable php on your Personal Web Sharing if it's not already enabled
NOTE: php_enable will NOT work on Leopard (Mac OS X 10.5), it patches Apache 1 config file, Leopard uses Apache 2
4. Run the jpeg-6b.pkg installer included on the WebGalleryGenerate dmg if you want to install the jpegtran utility which allows for losslessly rotating jpegs, this is an installer for the jpeg-6b library from the Independent JPEG Group
5. Copy the WebGalleryGenerate script application to your Applications folder (or wherever you want to keep it)

To use the script:
1. Select some images on your hard drive and drag them onto the WebGalleryGenerate icon (the script was orginally for JPEGs only, but now should work with JPEG, PNG, GIF, TIFF, BMP, PICT files)
2. Fill in the values of the dialog box which appears, here is a WebGalleryGenerate screenshot of some possible values
3. When you click the "Go" button, the application copies your images into a folder in your "Sites" folder, and writes a customized version of the index.php script and opens that file in your browser, with a url like http://127.0.0.1/~yourusername/partypix/
4. Check the values in the options on the web form (screenshot), and if it all looks good, click the "Make Thumbs" button and the index.php will use ImageMagick to generate thumbnails for the images and resize/convert the large images
5. Check out your gallery of images, and if all is well, you can go to your Sites folder in your Home directory and upload the gallery to a webserver

Warning: If you are using a version of ImageMagick greater than 6.1.7, you must use WebGalleryGenerate 0.24 or greater. ImageMagick 6 introduced the -strip option to remove profile and EXIF data, and the old "+profile '*'" started causing serious problems on some version after 6.1.7 by attempting to read in every file in the directory as a profile to add to the image. 0.24 and greater checks ImageMagick's version, and uses -strip on versions 6 and greater.
Version 0.25 adds rudimentary support for avi and mov files but the jpeg thumbnails must be generated in advance


Current version 0.25
WebGalleryGenerate25.dmg.gz 350K
WebGalleryGenerate version 25 php file
older versions:
WebGalleryGenerate version 24 php file
WebGalleryGenerate24.dmg.gz 380K
WebGalleryGenerate version 23 php file
WebGalleryGenerate23.dmg.gz 380K
WebGalleryGenerate22.dmg.gz 376K
WebGalleryGenerate version 21 php file
WebGalleryGenerate21.dmg.gz 376K
WebGalleryGenerate version 20 php file
WebGalleryGenerate20.dmg.gz 380K


harvey.nu