What is PyAlbum?
PyAlbum is a free and platform independent program that creates output files from pictures. Its main purpose is
to create web albums (sometimes also called galleries here) from digital
It can parse directory trees of any depth recursively and create linked output with the
same tree structure. But you are not forced to generate HTML pages, the output can also
be XML or simple, comma separated text. Everything is configurable and optional.
The output is generated by templates (called skins in some of the
other programs). If none of the provided templates fits your needs, simply build your own!
The pictures can be generated in up to three different resolutions: thumbnail, low
resolution and original size. The number of generated files is configurable within a
template configuration file. So you can create frame sets, style sheets and other
files you need only once. You can even feed the generated style sheet or HTML pages
with your own user defined options, like colors, borders or anything you can imagine.
Any number of index or overview pages can be created for different
purposes, e.g. linking to low resolution and full picture pages. Any number of
picture pages for each picture can be created, too. The only constraint is
that there must at least one output file be defined.
Each directory and each picture can have a short title and any number of
arbitrary long descriptions. The source for those texts can be flexibly
The photos can have several EXIF fields, which can be used to build the mentioned
texts, and of course the most used so-called JPEG comment. All of the EXIF values
can be used and displayed in the output files.
I know, there are tons of similar programs out, many of them even for free. So it
simply should have been called YAAG.
I have tested several of them and even paid money for some of them, but none could
fit all my needs.
So I decided to enhance my Python programming knowledge while writing the ultimate album
generator which should handle all features and ideas I have ever seen in this arena.
PyAlbum was developed from scratch with several code lines and ideas from
PyGallery and with many ideas from
JAlbum and its skins. Not to forget
BilderGalerie with its panorama feature,
which was the main reason to develop my own program.
My intention is not to enter into competition with the authors of those programs.
Instead I want to thank them very much for their free software and inspiration!
If you have any remarks or suggestions, please go to the SourceForge project page.
To use this program you need some modules. All of them are free. Because of their
size and usability for other purposes they are not bundled with PyAlbum.
You will have to download and install them by yourself.
- Freeware, Open Source (GPL)
- Runs on any platform Python and PIL are available. These are at least Windows/32, Linux,
Mac OS and SUN Solaris.
- Output is viewable with any web browser from local hard disk and any web server, no
need for CGI or mod_XX on the server.
- Driven by a template system. Use one of the provided examples or create your own.
All navigation between index pages and pictures very simple.
- Unlimited number of user definable options for colors, borders, texts, ...
- No programming necessary.
- Supports many image formats. JPG, GIF, TIFF, PCX, PNG, TGA, BMP,... (configurable)
- Supports video files like MPG, AVI, WMV (configurable)
- Supports audio files like WAV, MP3 (configurable)
- Supports image filters (text or logos on images, frames, masks, ...)
- Creates multiple index pages with thumbnail pictures.
- Creates picture (slide show) pages.
- EXIF support. Displays all EXIF data like shutter speed, focal length, camera make
and model,... Recalculates focal length to 35 mm camera equivalents for any camera
the factor is available.
- Displays panorama photos across several columns on index pages instead of making
them very low.
- Processes deep directory structures with thousands of photos.
- Intelligent, highly optimized updates of existing albums. Just add, modify or
delete one photo and the others will not be touched again.
- Can change options and even the template at any directory level.
- Collects and displays picture and directory information from many sources.
- Templates can be multi language, time and date formats configurable.
- Makes file and directory names web safe.
- Currently only usable from command line, but will get a GUI soon.
Download and installation
You can download the latest version from the PyAlbum SourceForge project page,
its history can be found there, too.
- First, install all required software mentioned above in this order:
- Python 2.3.x
- PIL 1.1.4
Next, unpack the PyAlbumXX.zip anywhere. It will create its own base directory.
Then edit one of the *.cfg files in the program directory and adapt the entries
to your needs, especially the inputdir and the outputdir.
inputdir should point to a directory with some pictures. If you have read the
Program options page you know
how to add some texts to your pictures.
outputdir should be a new or empty directory on your computer.
The templatename must be one of the subdirectories in the templates
folder. If you are on Linux case is significant here!
Run the program:
python PyAlbum.py -c <your edited file>.cfg
and look at the output.
Sources of picture and album information
The information displayed in the generated album has can come from several different
sources. The layout is defined by templates and options. EXIF data and comments are
extracted from the pictures. Each picture and each directory has a "title" and a
"description", which can be used by templates. How these are collected is defined by the following options:
All of those files following are optional and can be created and edited by you
to comment your folders and pictures.
The information is extracted from the following files:
- 1. Picture files:
- May contain EXIF information with several fields and JPEG comments.
- 2. <dirname>.txt:
- A simple text file outside of a directory. Can be used for the description of
that directory. Should be simple text, not HTML.
- 3. <picturename>.txt:
- A simple text file inside of a directory. Can be used for the description of
that picture. Should be simple text, not HTML. <picturename> is without
- 4. meta.properties:
- This is my favourite! Within this file you can store every information on
folders and pictures you want. And it is extensible in the future and it will
Be sure to use exact case and names for the pictures!
Let me provide an example:
folderTitle=My First Folder
folderDescription=This is the description for my first folder, which could be a very long line.
# this is a comment line followed by an empty line
title.pic0001.jpg = title in meta for pic0001.
description.pic0001.jpg=description in meta for pic0001
- 5. comments.properties:
This file contains one line for each picture. Be sure to use exact case and names for the pictures!
You can use these comments as titles or as descriptions.
Let me provide an example:
carmel.jpg=carmel jpeg comment
- 6. descript.ion:
- Almost the same as 'comments.properties' explained above, but there is white space
instead of an equal sign between the picture name and the comment (a blank or tab).
The picture name must be surrounded by double quotes if it contains blanks.
- 7. include files:
- These files can only contain information on directories. They are includable
into OnceFiles, IndexFiles or PictureFiles. There may exist up to six of these
in a single input directory: onceheader.inc, oncefooter.inc, indexheader.inc,
indexfooter.inc, pictureheader.inc and picturefooter.inc. These may and should contain
HTML code. Where and whether they are included depends on the template files.
They are processed by the templating system, so they may include PyAlbum variables.
top of page