summaryrefslogtreecommitdiffstats
path: root/lib/private/Preview/HEIC.php
diff options
context:
space:
mode:
authorSebastian Steinmetz <me@sebastiansteinmetz.ch>2018-08-17 18:34:51 +0200
committerSebastian Steinmetz <me@sebastiansteinmetz.ch>2018-08-17 18:37:23 +0200
commit5a996b5f879c83f0911ba33af542fdd844929b79 (patch)
treec1da9f7c5415f036996108b8973c3e4ef0cb8538 /lib/private/Preview/HEIC.php
parent8a7bc3fb039280a61b46af5795476be062e003fe (diff)
downloadnextcloud-server-5a996b5f879c83f0911ba33af542fdd844929b79.tar.gz
nextcloud-server-5a996b5f879c83f0911ba33af542fdd844929b79.zip
Address comments from @rullzer:
- implement isAvailable - run tests only if ImageMagick with HEIC support is available in the environment Signed-off-by: Sebastian Steinmetz <me@sebastiansteinmetz.ch>
Diffstat (limited to 'lib/private/Preview/HEIC.php')
-rw-r--r--lib/private/Preview/HEIC.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/Preview/HEIC.php b/lib/private/Preview/HEIC.php
index 9057596847c..151326129bc 100644
--- a/lib/private/Preview/HEIC.php
+++ b/lib/private/Preview/HEIC.php
@@ -29,4 +29,12 @@ class HEIC extends Bitmap {
public function getMimeType() {
return '/image\/hei(f|c)/';
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public function isAvailable(\OCP\Files\FileInfo $file) {
+ return in_array("HEIC", \Imagick::queryFonts("HEI*") );
+ }
+
}