]> git.sommitrealweird.co.uk Git - bpgallery.git/commitdiff
* Add support for bounding box based image resize
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Sat, 22 Dec 2007 19:13:12 +0000 (19:13 +0000)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Sat, 22 Dec 2007 19:13:12 +0000 (19:13 +0000)
* Remove related item from TODO list

TODO
bpgallery.sh

diff --git a/TODO b/TODO
index 2d86dd219ae04c901cefab3d7e97763e67430e61..c35150728e10cc026fea10e3b46a47e1de37ecc9 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,5 +1,2 @@
-* Allow a fixed height to be specified instead or as well as a fixed width, in
-  the latter case, resize to which ever fits the bounding box, but keep the
-  aspect ratio.
 * Allow ordering of images rather than the current "sort" based algorithm on
   filename.
 * Allow ordering of images rather than the current "sort" based algorithm on
   filename.
index d26821a325a7434b866dd22238bcb0f687215743..ade52a50b24560969197a672a272c720d5582f56 100755 (executable)
@@ -567,11 +567,19 @@ function generate_resized_images() {
 }
 
 function generate_thumbs() {
 }
 
 function generate_thumbs() {
-       generate_resized_images $WIDTH $ICONSDIRECTORY
+       if [[ ! -z $HEIGHT ]]; then
+               generate_resized_images "${WIDTH}x${HEIGHT}" $ICONSDIRECTORY
+       else
+       generate_resized_images $WIDTH $ICONSDIRECTORY
+       fi
 }
 
 function generate_medium() {
 }
 
 function generate_medium() {
-       generate_resized_images $MEDIUMWIDTH $MEDIUMDIRECTORY
+       if [[ ! -z $MEDIUMHEIGHT ]]; then
+               generate_resized_images "${WIDTH}x${HEIGHT}" $MEDIUMDIRECTORY
+       else
+               generate_resized_images $MEDIUMWIDTH $MEDIUMDIRECTORY
+       fi
 }
 
 function generate_pages() {
 }
 
 function generate_pages() {