Photoshrink makes it easy to create web pages for presenting a collection of images. The source package comes with a command–line utility and a web interface. Photoshrink is written in Python and requires the Python Imaging Library. The software is distributed under the terms of the GPL.
Recent news
18 mar 2003 – release 3.2.1 : I've enabled some verbose output from the command line script, after hearing that the image sets aren't being sorted properly.
16 mar 2003 – release 3.2.0 : Photoshrink finally has a mod_python interface ! I am muy pleased about this. Check out the working installation for examples of what generated pages look like. Due to limited disk space on the server you'll have to install it yourself to test out the web interface.
12 mar 2003 – New bugfix release with small feature additions.
18 feb 2003 – Good grief, I forgot to include a file in the distribution. Also been working on a mod_python interface for Photoshrink, so I'm going to go ahead and release a new tarball.
31 jan 2003 – Prereleases for version 3 are available. Be sure to get these instead of the old code ; the code's been cleaned up quite a bit !
16 jul 2001 – release 2.3 : Changes made are described below.
See what it does
There is now a working installation of Photoshrink on http://ambient.2y.net. Check it out !
Download
Get the script here :
You can also look at the CVS repository.
Getting the Python Imaging Library
Some Red Hat users have been encountering problems because the Python Imaging Library doesn't come standard with Red Hat. I'd imagine that other distros have this situation as well, but the Red Hat users are the most vocal. :-) You need to install a copy of the Python Image Library to use this program.
Debian users just need to use apt-get install python-imaging
. Red Hat users
can download RPMs for the PIL at http://www.rpmfind.net/, or install apt and
download RPMs that way.
Installation
Photoshrink now uses Python's excellent distutils tool for distribution and installation. If you're already familiar, just do your thing. If not, you basically need to download the package file, unzip it somewhere, and go to that directory using a console. Then type :
python setup.py install --prefix=PREFIX
where PREFIX is the root directory where you'd like to install Photoshrink. After that, make sure that PREFIX/lib/python2.2/site-packages is in your PYTHONPATH environment variable (assuming you're using python2.2 ; change the version numbers of the Python library directory appropriately if not), and make sure that PREFIX/bin is in your PATH environment variable. Setting these environment variables depends on your operating system (and your shell, if you're using Unix).
Using bash under Linux, I put the following in my ~/.bashrc :
SANDBOX=$HOME/sandbox export PATH=$SANDBOX/bin:$PATH export PYTHONPATH=$SANDBOX/lib/python2.2/site-packages:$PYTHONPATH
Then type :
photoshrink --help
to get some help.
Mod Python
Setting up the mod_python interface is described in the README.mod_python file in the distribution. I hope it's easy to follow.
Documentation
You can view the API documentation online. Hopefully I'll work on writing a user guide soon, or (even more hopefully) the software is easy enough to understand by itself.
License and disclaimer
Photoshrink is copyright (c) 2000–2003 Leif Morgan Johnson. Photoshrink is licensed under the GNU General Public License, which gives you permission to read and modify the source code, and even to distribute copies and modifications as you see fit. The only restrictions are that you preserve the copyright notice, and that you always make the source code available when redistributing copies or modifications yourself.
Photoshrink also comes with no warranty of any kind. If it suddenly erases all your mp3s, or writes over some files you had, or makes your computer reboot, or causes smoke to come out of your mouse, then it's really your problem. Use with appropriate caution.
Contact
Send praise, criticism, money, and so on to Leif Johnson : <leif@ambient.2y.net>.