]> git.sommitrealweird.co.uk Git - bpgallery.git/blobdiff - bpgallery.sh
* Add support for bounding box based image resize
[bpgallery.git] / bpgallery.sh
index d26821a325a7434b866dd22238bcb0f687215743..ade52a50b24560969197a672a272c720d5582f56 100755 (executable)
@@ -567,11 +567,19 @@ function generate_resized_images() {
 }
 
 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() {
-       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() {