diff options
author | kondou <kondou@ts.unde.re> | 2013-08-31 23:48:23 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-08-31 23:48:23 +0200 |
commit | 235638e5abd35f2f19944bbe0b5a838b83465252 (patch) | |
tree | 27b531a7f9a2de054e707d4415ce7de2a2c51556 /lib/public/preview.php | |
parent | 0869f9b655ddd0b285629256521d7eafde2f5d8a (diff) | |
parent | 92e90c8eb995c886b3e9cd77c14e3f0b25b95cd7 (diff) | |
download | nextcloud-server-235638e5abd35f2f19944bbe0b5a838b83465252.tar.gz nextcloud-server-235638e5abd35f2f19944bbe0b5a838b83465252.zip |
Merge branch 'master' into fix_4258
Conflicts:
lib/image.php
Diffstat (limited to 'lib/public/preview.php')
-rw-r--r-- | lib/public/preview.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/public/preview.php b/lib/public/preview.php new file mode 100644 index 00000000000..e488eade4da --- /dev/null +++ b/lib/public/preview.php @@ -0,0 +1,34 @@ +<?php +/** + * Copyright (c) 2013 Frank Karlitschek frank@owncloud.org + * Copyright (c) 2013 Georg Ehrke georg@ownCloud.com + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ +namespace OCP; + +/** + * This class provides functions to render and show thumbnails and previews of files + */ +class Preview { + + /** + * @brief return a preview of a file + * @param $file The path to the file where you want a thumbnail from + * @param $maxX The maximum X size of the thumbnail. It can be smaller depending on the shape of the image + * @param $maxY The maximum Y size of the thumbnail. It can be smaller depending on the shape of the image + * @param $scaleup Scale smaller images up to the thumbnail size or not. Might look ugly + * @return image + */ + public static function show($file,$maxX=100,$maxY=75,$scaleup=false) { + return(\OC_Preview::show($file,$maxX,$maxY,$scaleup)); + } + + + + public static function isMimeSupported($mimetype='*') { + return \OC\Preview::isMimeSupported($mimetype); + } + +} |