diff options
author | Olivier Paroz <github@oparoz.com> | 2015-06-06 16:21:36 +0200 |
---|---|---|
committer | Olivier Paroz <github@oparoz.com> | 2015-06-06 16:25:04 +0200 |
commit | 71d65cb713ebfb85ee19f9f3cd17dd915360fe9b (patch) | |
tree | 7281b8a32d148d27ae375dd1c45308416e63eee7 /lib/public | |
parent | 16708ae1873ddd563c3177b87cf7a4c395dca609 (diff) | |
download | nextcloud-server-71d65cb713ebfb85ee19f9f3cd17dd915360fe9b.tar.gz nextcloud-server-71d65cb713ebfb85ee19f9f3cd17dd915360fe9b.zip |
Fix max preview, some resizing and caching issues and force preview providers to resize their previews properly
* introduces a method in OC_Image which doesn't stretch images when trying to make them fit in a box
* adds the method to all key providers so that they can do their job, as expected by the Preview class
* improves the caching mechanism of Preview in order to reduce I/O and to avoid filling the available disk space
* fixes some long standing issues
* **contains mostly tests**
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/iimage.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/public/iimage.php b/lib/public/iimage.php index 202adeaba54..c62bf36d2de 100644 --- a/lib/public/iimage.php +++ b/lib/public/iimage.php @@ -170,4 +170,14 @@ interface IImage { * @since 8.1.0 */ public function fitIn($maxWidth, $maxHeight); + + /** + * Shrinks the image to fit within a boundary while preserving ratio. + * + * @param integer $maxWidth + * @param integer $maxHeight + * @return bool + * @since 8.1.0 + */ + public function scaleDownToFit($maxWidth, $maxHeight); } |