mirror of
https://github.com/getformwork/formwork.git
synced 2025-02-25 02:02:57 +01:00
Fix transparency not handled when loading images
This commit is contained in:
parent
140e5f8793
commit
962ed5e427
@ -672,10 +672,12 @@ class Image extends File
|
||||
break;
|
||||
case 'image/png':
|
||||
$this->image = imagecreatefrompng($this->path);
|
||||
$this->enableTransparency($this->image);
|
||||
break;
|
||||
case 'image/gif':
|
||||
$this->image = imagecreatefromgif($this->path);
|
||||
imagepalettetotruecolor($this->image);
|
||||
$this->enableTransparency($this->image);
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException('Unsupported image MIME type');
|
||||
|
Loading…
x
Reference in New Issue
Block a user