This is a collection of PHP scripts (version 1.0) used for making
the clickable web version of the group photo at Debconf5.
Short overview:

  + An SQL database (I used MySQL) while you are filling
    in the names. Once all the names are in place, you can
    just take a copy of the HTML & Javascript 'index.php'
    generates, and remove the DB.

    See 'examples/debconf5.html' for an example.

  + The scripts only support circular hotspots.

  + Hotspot coordinates (faces) are stored in the database
    on range [0,1] so you can have multiple different
    resolutions of the photo.

How to make your very own exciting clickable group photo:

 + Make sure you have a runnning Apache with PHP support,
   Gimp, MySQL, Jpegpixi and Imagemagick 'convert' tool.

 + Open a photo into some image editor (Gimp, for example)
   and make a new image that is otherwise black but has
   tiny white spots in the middle of people's faces.

 + Save the image as a JPEG and apply the 'jpeghotp'
   tool to it (shipped with 'jpegpixi' package). I will
   find the white spots and generate a text file with
   their locations and dimensions. See 'examples/spots.txt'
   for eaxmple.

 + Edit 'preprocess.php':

   + Change in the correct filenames for the photo and the
     spots file from the last step.

   + Measure the average face radius (in pixels) in GIMP and
     change $spot_radius accordingly.

   + Decide how large face closeups you want (128x128 is nice)
     and change $closeup_size accordingly.

 + Open 'preprocess.php' it in a browser (through Apache, so
   it runs the PHP). This will generate SQL statements to
   insert the spot locations into the database and shell
   commands to generate the face-closeups.

   + Copy-paste the SQL statements to 'database.sql' and
     pipe it to mysql.

   + Do 'mkdir closeups' and run the 'convert' commands.

 + Edit your database connection details into 'config.inc'.

 + Edit your image name and resolution details into 'index.php'.
   (search the file for '$pic_sizes')

 + Test. 'index.php' shows the picture, 'edit.php'
   lets you edit one face at a time (click a face to edit)
   and 'edit-all.php' lets you mass-input the names.

Have fun.

- Jarno Elonen <elonen@iki.fi>, 2005-09-12


This software is distributed under the MIT license:

Copyright (C) 2005 by Jarno Elonen <elonen@iki.fi>

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
