diff options
author | patdenice <patdenice@piwigo.org> | 2011-04-21 22:35:16 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2011-04-21 22:35:16 +0000 |
commit | 17a04fcd399965f5589b26245ac040969d5ac117 (patch) | |
tree | 42d3312acb49873897e47a6dcb22933c290a9d67 /include/ws_functions.inc.php | |
parent | d1eb25df099fa74e725692f3d6335b5d35abfc4b (diff) |
feature:2273
Add crop functionality to webservice and batch manager.
git-svn-id: http://piwigo.org/svn/trunk@10553 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/ws_functions.inc.php')
-rw-r--r-- | include/ws_functions.inc.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php index 2646abbe0..674ac8c6b 100644 --- a/include/ws_functions.inc.php +++ b/include/ws_functions.inc.php @@ -2673,11 +2673,11 @@ function ws_images_resize($params, &$service) return new PwgError(403, 'Unknown type (only "thumbnail" or "websize" are accepted'); } - $resize_params = array('maxwidth', 'maxheight', 'quality'); + $resize_params = array('maxwidth', 'maxheight', 'quality', 'crop', 'follow_orientation'); $type = $params['type'] == 'thumbnail' ? 'thumb' : 'websize'; foreach ($resize_params as $param) { - if (empty($params[$param])) + if (empty($params[$param]) and isset($conf['upload_form_'.$type.'_'.$param])) $params[$param] = $conf['upload_form_'.$type.'_'.$param]; } @@ -2710,7 +2710,9 @@ WHERE id = '.(int)$params['image_id'].' $params['maxwidth'], $params['maxheight'], $params['quality'], - true + true, + get_boolean($params['crop']), + get_boolean($params['follow_orientation']) ); return true; } |