From a2c2655ef01e348beafff871626339d2044c5aa9 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 28 Jan 2014 11:25:36 +0000 Subject: [PATCH] * Adressbook/CardDAV: changed (down-)scaling of images to width of 240px (was 60px) to cater for higher screen resolutions --- addressbook/inc/class.addressbook_bo.inc.php | 4 ++-- addressbook/inc/class.addressbook_groupdav.inc.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/addressbook/inc/class.addressbook_bo.inc.php b/addressbook/inc/class.addressbook_bo.inc.php index 93632e9396..fd9f8e4669 100755 --- a/addressbook/inc/class.addressbook_bo.inc.php +++ b/addressbook/inc/class.addressbook_bo.inc.php @@ -949,10 +949,10 @@ class addressbook_bo extends addressbook_so * Resizes photo to 60*80 pixel and returns it * * @param string|FILE $photo string with image or open filedescribtor - * @param int $dst_w=60 max width to resize to + * @param int $dst_w=240 max width to resize to * @return string with resized jpeg photo, null on error */ - public static function resize_photo($photo,$dst_w=60) + public static function resize_photo($photo,$dst_w=240) { if (is_resource($photo)) { diff --git a/addressbook/inc/class.addressbook_groupdav.inc.php b/addressbook/inc/class.addressbook_groupdav.inc.php index ca25bfb7b6..2b9cb494fb 100644 --- a/addressbook/inc/class.addressbook_groupdav.inc.php +++ b/addressbook/inc/class.addressbook_groupdav.inc.php @@ -703,7 +703,8 @@ class addressbook_groupdav extends groupdav_handler $props['addressbook-description'] = HTTP_WebDAV_Server::mkprop(groupdav::CARDDAV,'addressbook-description',$props['displayname']); } // setting an max image size, so iOS scales the images before transmitting them - $props['max-image-size'] = HTTP_WebDAV_Server::mkprop(groupdav::CARDDAV,'max-image-size',4096); + // we currently scale down to width of 240px, which tests shown to be ~20k + $props['max-image-size'] = HTTP_WebDAV_Server::mkprop(groupdav::CARDDAV,'max-image-size',24*1024); // supported reports (required property for CardDAV) $props['supported-report-set'] = HTTP_WebDAV_Server::mkprop('supported-report-set',array(