Hi guys, i'm a php beginner
I was trying to create a function to merge two images into one. I have been successfully merging a frame(png) on top of an image uploaded (jpeg) on low res.
Then i move on to increase the image file size so that i have better resolution that can be print. I increase both my frame(.png / about 2.7mb) and image(.jpg / 1.9mb) resolution into 2048px * 1536px and when i run the exact same function by tweaking the following it doesn't work anymore. I also have an html form below the image preview ( which i mention above that doesn't display after i increase the image resolution ) also it no longer display.
imagecopy($image, $frame, 0, 0, 0, 0, 2048, 1536);
My code applies as shown below:
<?php
$image = imagecreatefromstring(file_get_contents("img/source.jpg");
$frame = imagecreatefrompng('img/frame_test.png');
imagealphablending($frame, true);
imagesavealpha($frame, true);
imagecopy($image, $frame, 0, 0, 0, 0, 2048, 1536);
header('Content-Type: image/png');
imagejpeg($image, 'img/done.jpg');
$photoframe = 'img/done.jpg';
imagedestroy($image);
imagedestroy($frame);
?>
<div id="preview">
<img class="preview-img" src="<?php echo $photoframe; ?>" alt="Your Image" title="Your Image" />
</div>
<div id="cust-form"> ...