Hi there
im getting the following when viewing a collection view when an image that has been uploaded
Fatal error: Call to undefined function imagecreatefrompng() in .... \administrator\components\com_mycom\classes\images.php on line 338
snippet below
function load($file = null)
{
if (!$file)
$file = $this->file;
if (!$this->type)
$this->type = $this->typeFromMime(self::getMime($file));
if($this->type=='jpeg')
$image = imagecreatefromjpeg($file);
if($this->type=='png')
$image = imagecreatefrompng($file);
if($this->type=='bmp')
$image = imagecreatefromwbmp($file);
if($this->type=='gif')
{
$data = file_get_contents($file);
$image = imagecreatefromstring($data);
}
return $image;
}
- New / Fresh component that i started building over weekend
- have tried for jpeg as well but still fails
- when there is no file defined layout displays normally without error (for obvious reasons)
- Have done search on the admin side of com_mycomponent and no such function is found
Config 2.0 build - jquery - embedded - exploded - reduced - model
Thanks in advance