;;; album.el --- Photo album utility ;; Copyright (C) 2004 MORIOKA Tomohiko ;; Keywords: Photo, image, album, HTML, WWW ;; This file is part of Album. ;; Album is free software; you can redistribute it and/or modify it ;; under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; Album is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. ;;; Commentary: ;; This facility is documented in the Emacs Manual. ;;; Code: (defun album-make-spec-by-width (width limit spec-name) (when (> width limit) (let ((percent (floor (/ (* limit 100.0) width)))) (vector percent spec-name (/ (* width percent) 100.0) (/ (* height percent) 100.0))))) (defun album-make-spec-by-height (height limit spec-name) (when (> height limit) (let ((percent (floor (/ (* limit 100.0) height)))) (vector percent spec-name (/ (* width percent) 100.0) (/ (* height percent) 100.0))))) (defun album-write-html (dest-dir prev-file file next-file prev-grade grade next-grade) (with-temp-buffer (insert "\n") (insert "
\n") (insert (format "