aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-12-16 17:00:06 +0000
committerpatdenice <patdenice@piwigo.org>2011-12-16 17:00:06 +0000
commit1ea0155ad768dc7dd58e75a46d44865c6db03989 (patch)
treed3c5175a87f60759a2fad8afa96815ecf69a2d2f /include
parentd827eacab4a44017349590683ee92026eb06bb60 (diff)
bug:2535
Image is not cropped and ressized if requested size is bigger than image size. git-svn-id: http://piwigo.org/svn/trunk@12749 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r--include/ws_functions.inc.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php
index 6c3838aa1..6adbfa065 100644
--- a/include/ws_functions.inc.php
+++ b/include/ws_functions.inc.php
@@ -3232,6 +3232,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'],
@@ -3239,8 +3244,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();