mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-06 18:01:31 +02:00
feature:2273
Add crop functionality to webservice and batch manager. git-svn-id: http://piwigo.org/svn/trunk@10553 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user