How can I resize $image_2 & $iamge_3 To be 350x350 without aspect ratio.
I want it to fits two transparency space made 350x350.
<?php
$imageFile = base_url('upload/users/images/').image_to_thumb($user->image); // 133 x 133
$watermarkFile = base_url('upload/users/images/').image_to_thumb($user->image); // 133 x 133
$bgFile = base_url('/backgroundtest.png'); // 93 x 93
// We want our final image to be 76x76 size
$x = 1200;
$y = 630;
// dimensions of the final image
$final_img = imagecreatetruecolor($x, $y);
// Create our image resources from the files
$image_1 = imagecreatefrompng($imageFile);
$image_2 = imagecreatefromjpeg($watermarkFile);
$image_3 = imagecreatefrompng($bgFile);
// Enable blend mode and save full alpha channel
imagealphablending($final_img, true);
imagesavealpha($final_img, true);
imagecopy($final_img, $image_1, 200, 200, 0, 0, 350, 350);
imagecopy($final_img, $image_2, 200, 200, 0, 0, 350, 350);
imagecopy($final_img, $image_3, 0, 0, 0, 0, 1200, 630);
imagepng($final_img, encode_id($user->id).'.png');
?>