I have a problem with creating watermark in Zend Framework action.
I have following code, which works perfectly in pure php.
But when i put this in zend action, it doesn’t work and I have a message, that image is not displayed, because it has errors…
How can I convert this code to work in Zend Framework?
$stamp = imagecreatefrompng('/home/rukia/csigallery/img/qrcode.png');
$im = imagecreatefromjpeg('/home/rukia/csigallery/img/kartka.jpg');
$marge_right = 10;
$marge_bottom = 10;
$sx = imagesx($stamp);
$sy = imagesy($stamp);
imagecopy($im, $stamp, imagesx($im) - $sx - $marge_right, imagesy($im) - $sy - $marge_bottom, 0, 0, imagesx($stamp), imagesy($stamp));
header('Content-type: image/png');
imagepng($im);
imagedestroy($im);
@Tim Fountain is correct .
Did you disabled your layout and view render ?
Will Output a PNG image to either the browser or a file . In this case browser .