From 0db141fc62c90de376a2658868a0c3f42f45395b Mon Sep 17 00:00:00 2001 From: patdenice Date: Fri, 29 Apr 2011 17:38:59 +0000 Subject: feature:2259 Create two different methods in webservice to create/regenerate thumbnail and to regenerate websize. git-svn-id: http://piwigo.org/svn/trunk@10686 68402e56-0260-453c-a942-63ccdbb3a9ee --- ws.php | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) (limited to 'ws.php') diff --git a/ws.php b/ws.php index a328c94f0..d1d774899 100644 --- a/ws.php +++ b/ws.php @@ -405,25 +405,35 @@ function ws_addDefaultMethods( $arr ) ); $service->addMethod( - 'pwg.images.resize', - 'ws_images_resize', + 'pwg.images.resizeThumbnail', + 'ws_images_resizethumbnail', array( 'image_id' => array('default' => null), 'image_path' => array('default' => null), - 'type' => array('default' => 'thumbnail'), + 'maxwidth' => array('default' => $conf['upload_form_thumb_maxwidth']), + 'maxheight' => array('default' => $conf['upload_form_thumb_maxheight']), + 'quality' => array('default' => $conf['upload_form_thumb_quality']), + 'crop' => array('default' => $conf['upload_form_thumb_crop']), + 'follow_orientation' => array('default' => $conf['upload_form_thumb_follow_orientation']), + 'library' => array('default' => $conf['graphics_library']), + ), + 'Create/Regenerate thumbnails photo with given arguments. +
One of arguments "image_id" or "image_path" must be sent.' + ); + + $service->addMethod( + 'pwg.images.resizeWebsize', + 'ws_images_resizewebsize', + array( + 'image_id' => array(), + 'maxwidth' => array('default' => $conf['upload_form_websize_maxwidth']), + 'maxheight' => array('default' => $conf['upload_form_websize_maxheight']), + 'quality' => array('default' => $conf['upload_form_websize_quality']), 'automatic_rotation' => array('default' => $conf['upload_form_automatic_rotation']), 'library' => array('default' => $conf['graphics_library']), - 'maxwidth' => array('default' => null), - 'maxheight' => array('default' => null), - 'crop' => array('default' => null), - 'follow_orientation' => array('default' => null), - 'quality' => array('default' => null), ), - 'Create/Regenerate thumbnails or websize photo with given arguments. -
One of arguments "image_id" or "image_path" must be passed filled. -
Argument "type" can be "thumbnail" or "websize". Default is "thumbnail". -
If maxwidth, maxheight, crop, follow_orientation or quality are missing, default parameters of upload will be used.' -); + 'Regenerate websize photo with given arguments.' + ); $service->addMethod( 'pwg.extensions.update', -- cgit v1.2.3