mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-21 00:53:04 +02:00
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
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user