Open BixinLu opened 8 years ago
@bibom change save image in class
# Save image
if(preg_match('/^(.*)\.(jpeg|jpg)$/', $imgTarget)){
$functionTarget($this->imgSource, $imgTarget, 100);
}elseif(preg_match('/^(.*)\.(png)$/', $imgTarget)){
$functionTarget($this->imgSource, $imgTarget, 0);
}elseif(preg_match('/^(.*)\.(gif)$/', $imgTarget)){
$functionTarget($this->imgSource, $imgTarget);
}
I am getting this ERROR
Fatal error: Function name must be a string in watermark.php on line 185
I am trying to upload and directly add to watermark function. Here is the Code:-
$watermark = new Watermark();
$temp_pimage=$_FILES["pimage"]["tmp_name"];
$watermark->apply($temp_pimage, $pimage, 'img/watermark.png', 4);}
Anyone can help me out what is the issue?
Add upper case file extensions in getFunction:
if(preg_match("/^(.*)\.(jpeg|jpg|JPEG|JPG)$/", $name)){
etc.
imagepng(): gd-png error: compression level must be 0 through 9 in watermark.php on line 206