summaryrefslogtreecommitdiffstats
path: root/lib/private/image.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-03-17 08:40:59 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2014-03-17 08:40:59 +0100
commitcd038604d396b7611353041cb8ed033f23fe305b (patch)
treec896065b4754a8d4bb22ddd060878ac107f3ae7e /lib/private/image.php
parent79ba930ef90d3e54c02f62c43f61c190e11fb4ec (diff)
downloadnextcloud-server-cd038604d396b7611353041cb8ed033f23fe305b.tar.gz
nextcloud-server-cd038604d396b7611353041cb8ed033f23fe305b.zip
unit tests for specific image type output added
Diffstat (limited to 'lib/private/image.php')
-rw-r--r--lib/private/image.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/image.php b/lib/private/image.php
index dd041442ed6..c987ce92c3c 100644
--- a/lib/private/image.php
+++ b/lib/private/image.php
@@ -239,7 +239,12 @@ class OC_Image {
$retVal = imagepng($this->resource, $filePath);
break;
case IMAGETYPE_XBM:
- $retVal = imagexbm($this->resource, $filePath);
+ if (function_exists('imagexbm')) {
+ $retVal = imagexbm($this->resource, $filePath);
+ } else {
+ throw new Exception('\OC_Image::_output(): imagexbm() is not supported.');
+ }
+
break;
case IMAGETYPE_WBMP:
$retVal = imagewbmp($this->resource, $filePath);