From 39410697f536e7c1c265b10a4bce4e0e79c0afee Mon Sep 17 00:00:00 2001 From: patdenice Date: Fri, 16 Dec 2011 17:02:16 +0000 Subject: merge r12749 from trunk to branch 2.3 bug:2535 Image is not cropped and ressized if requested size is bigger than image size. git-svn-id: http://piwigo.org/svn/branches/2.3@12750 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/ws_functions.inc.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include/ws_functions.inc.php') diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php index 47b94da12..5e6abeca1 100644 --- a/include/ws_functions.inc.php +++ b/include/ws_functions.inc.php @@ -3250,6 +3250,11 @@ SELECT id, path, tn_ext, has_high prepare_directory(dirname($thumb_path)); $img = new pwg_image($image_path, $params['library']); + if (!is_bool($params['crop'])) + $params['crop'] = get_boolean($params['crop']); + if (!is_bool($params['follow_orientation'])) + $params['follow_orientation'] = get_boolean($params['follow_orientation']); + $result = $img->pwg_resize( $thumb_path, $params['maxwidth'], @@ -3257,8 +3262,8 @@ SELECT id, path, tn_ext, has_high $params['quality'], false, // automatic rotation is not needed for thumbnails. true, // strip metadata - get_boolean($params['crop']), - get_boolean($params['follow_orientation']) + $params['crop'], + $params['follow_orientation'] ); $img->destroy(); -- cgit v1.2.3