Skip to content

Commit

Permalink
Update GD.php
Browse files Browse the repository at this point in the history
  • Loading branch information
hkvstore committed Mar 7, 2022
1 parent 05d0b31 commit 2b81cb6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/PHPThumb/GD.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function __construct($fileName, $options = array(), array $plugins = arra

if (@$options['isDataStream'] && @$options['format']) {

$this->oldImage = imagecreatefromstring($fileName);
$this->oldImage = @imagecreatefromstring($fileName);
$this->setFormat($options['format']);

} else {
Expand All @@ -100,16 +100,16 @@ public function __construct($fileName, $options = array(), array $plugins = arra

switch ($this->format) {
case 'GIF':
$this->oldImage = imagecreatefromgif($this->fileName);
$this->oldImage = @imagecreatefromgif($this->fileName);
break;
case 'JPG':
$this->oldImage = imagecreatefromjpeg($this->fileName);
$this->oldImage = @imagecreatefromjpeg($this->fileName);
break;
case 'PNG':
$this->oldImage = imagecreatefrompng($this->fileName);
$this->oldImage = @imagecreatefrompng($this->fileName);
break;
case 'STRING':
$this->oldImage = imagecreatefromstring($this->fileName);
$this->oldImage = @imagecreatefromstring($this->fileName);
break;
}

Expand Down

0 comments on commit 2b81cb6

Please sign in to comment.