From 5a6b4fa99f63d5daefa2b3e9c5758140f98dd82c Mon Sep 17 00:00:00 2001 From: tomo Date: Wed, 3 Oct 2007 08:01:46 +0000 Subject: [PATCH] (www-page-size-specs): Add new spec `original'. (www-page-display-image): Support original size. --- www-page.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/www-page.el b/www-page.el index 9d1f04b..1fe9441 100644 --- a/www-page.el +++ b/www-page.el @@ -1,6 +1,6 @@ ;;; www-page.el --- Album page generator for page.cgi. -;; Copyright (C) 2005,2006 MORIOKA Tomohiko +;; Copyright (C) 2005,2006,2007 MORIOKA Tomohiko ;; Keywords: Photo, image, album, HTML, WWW @@ -49,6 +49,7 @@ (WUXGA 1920 1200) (QXGA 2048 1536) (WQXGA 2560 1600) + (original nil nil) )) (defun decode-url-string (string &optional coding-system) @@ -414,7 +415,7 @@ (when (file-exists-p file) (let (file-dir file-name resized-file resized-dir - spec) + spec width height) (cond (size (setq file-dir (file-name-directory file) @@ -427,7 +428,9 @@ size file-dir)))) (unless (file-exists-p resized-file) (setq size (intern size)) - (if (setq spec (assq size www-page-size-specs)) + (if (and (setq spec (assq size www-page-size-specs)) + (setq width (nth 1 spec)) + (setq height (nth 2 spec))) (progn (condition-case nil (unless (file-exists-p resized-dir) @@ -435,7 +438,7 @@ (error nil)) (call-process "convert" nil nil nil - "-resize" (format "%dx%d>" (nth 1 spec)(nth 2 spec)) + "-resize" (format "%dx%d>" width height) file resized-file) ) (setq resized-file file))) -- 1.7.10.4