From 06ed4e03676ca8087cc40ca3d018b96a055a3b96 Mon Sep 17 00:00:00 2001 From: hugetoad Date: Sun, 11 Jan 2004 08:36:56 +0000 Subject: Better check for function imagecreatetruecolor() git-svn-id: svn://svn.zabbix.com/trunk@1167 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/classes.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'frontends/php/include/classes.inc.php') diff --git a/frontends/php/include/classes.inc.php b/frontends/php/include/classes.inc.php index a01470f6..094badca 100644 --- a/frontends/php/include/classes.inc.php +++ b/frontends/php/include/classes.inc.php @@ -54,7 +54,7 @@ function initColors() { // I should rename No Alpha to Alpha at some point to get rid of some confusion - if(function_exists("ImageColorExactAlpha")&&function_exists("ImageCreateTrueColor")) + if(function_exists("ImageColorExactAlpha")&&function_exists("ImageCreateTrueColor")&&@imagecreatetruecolor(1,1)) { $this->colors["Red"]= ImageColorExactAlpha($this->im,255,0,0,50); $this->colors["Dark Red"]= ImageColorExactAlpha($this->im,150,0,0,50); @@ -505,7 +505,7 @@ check_authorisation(); - if(function_exists("ImageColorExactAlpha")&&function_exists("ImageCreateTrueColor")) + if(function_exists("ImageColorExactAlpha")&&function_exists("ImageCreateTrueColor")&&@imagecreatetruecolor(1,1)) { $this->im = ImageCreateTrueColor($this->sizeX+$this->shiftX+61,$this->sizeY+$this->shiftY+62+12*$this->num+8); } -- cgit