imagejpeg creating black image

388 Views Asked by At

I know it is an old question but I am not able to solve it. Here is my code

function add_ZK_mark($inputfile, $outputfile) {
$im = @imagecreatefromjpeg($inputfile);
$bg = @imagecolorallocate($im, 255, 255, 255);
$textcolor = @imagecolorallocate($im, 0, 0, 255);

list($x, $y, $type) = getimagesize($inputfile);
@imagejpeg($im, $outputfile);
@imagedestroy($im);

}

I am getting jpeg image type everytime. Using signature.js to get image in jpeg format. Thanks

0

There are 0 best solutions below