From 43f558830cce7c5f6aef9d47f79f7413e29dab1b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 28 Jan 2014 11:24:47 +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 4188293228..069df04e47 100755 --- a/addressbook/inc/class.addressbook_bo.inc.php +++ b/addressbook/inc/class.addressbook_bo.inc.php @@ -966,10 +966,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 b91f042957..c8c5573917 100644 --- a/addressbook/inc/class.addressbook_groupdav.inc.php +++ b/addressbook/inc/class.addressbook_groupdav.inc.php @@ -833,7 +833,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'] = array(