imagefttext($image1, 24, 0, 770, 290, $red, 'arial.ttf', $create_date);
imagefttext($image1, 24, 0, 285, 335, $red, 'arial.ttf', $weight);
imagefttext($image1, 24, 0, 285, 370, $red, 'arial.ttf', $measurement);
imagefttext($image1, 24, 0, 285, 410, $red, 'arial.ttf', $gravity);
imagefttext($image1, 24, 0, 285, 445, $red, 'arial.ttf', $ri);
imagefttext($image1, 24, 0, 285, 475, $red, 'arial.ttf', $color);
imagefttext($image1, 24, 0, 285, 520, $red, 'arial.ttf', $clarity);
imagefttext($image1, 24, 0, 285, 555, $red, 'arial.ttf', $cut);
imagefttext($image1, 24, 0, 285, 595, $red, 'arial.ttf', $remarks);
imagefttext($image1, 24, 0, 835, 180, $red, 'arial.ttf', $random_id);
#$filename1 = jpegtopng($filename1);
#####$jpeg_image = resizeImage( $filename1 , 170, 170);
#####$src = resizeImage ( $filename2, 170,170);
resizeMyImage('uploads/' . $random_id . '.jpg', 'Final/' . $random_id . '.jpg', 160, 160);
resizeMyImage('uploads/' . $random_id . '.png', 'Final/' . $random_id . '.png', 140, 140);
resizeMyImage('uploads/Sign.jpg', 'Final/Sign1.jpg', 140, 50);
//$magicianObj1 = new imageLib('uploads/'.$random_id.'.jpg');
//$magicianObj2 = new imageLib('uploads/'.$random_id.'.png');
//$magicianObj1 -> resizeImage(170, 170);
//$magicianObj2 -> resizeImage(140, 140);
//$magicianObj1 -> saveImage('Final/'.$random_id.'.jpg', 100);
//$magicianObj2 -> saveImage('Final/'.$random_id.'.png', 100);
$filename1 = imagecreatefromjpeg('Final/' . $random_id . '.jpg');
$filename2 = imagecreatefrompng('Final/' . $random_id . '.png');
$filename3 = imagecreatefromjpeg('Final/Sign1.jpg');
#echo $filename1;
#echo $src;
#int imagecopy ( resource dest_image, resource source_image, int dest_x, int dest_y, int source_x, int source_y, int source_width, int source_height)
imagecopy($image1, $filename2, 770, 5, 0, 0, 140, 140);
imagecopy($image1, $filename1, 770, 295, 0, 0, 160, 160);
imagecopy($image1, $filename3, 780, 460, 0, 0, 140, 50);
 imagefttext($image1, 25, 0, 245, 420, $red, 'arial.ttf', $measurement);
 imagefttext($image1, 25, 0, 245, 455, $red, 'arial.ttf', $cut);
 imagefttext($image1, 25, 0, 245, 488, $red, 'arial.ttf', $clarity);
 imagefttext($image1, 25, 0, 245, 525, $red, 'arial.ttf', $color);
 imagefttext($image1, 25, 0, 245, 562, $red, 'arial.ttf', $fluoresence);
 imagefttext($image1, 25, 0, 700, 305, $red, 'arial.ttf', $finish);
 imagefttext($image1, 25, 0, 700, 345, $red, 'arial.ttf', $table);
 imagefttext($image1, 25, 0, 700, 385, $red, 'arial.ttf', $crown);
 imagefttext($image1, 25, 0, 700, 420, $red, 'arial.ttf', $pavelion);
 imagefttext($image1, 25, 0, 700, 455, $red, 'arial.ttf', $gridle);
 imagefttext($image1, 25, 0, 700, 487, $red, 'arial.ttf', $culet_size);
 #$filename1 = jpegtopng($filename1);
 #####$jpeg_image = resizeImage( $filename1 , 170, 170);
 #####$src = resizeImage ( $filename2, 170,170);
 resizeMyImage('uploads/' . $random_id . '.jpg', 'Final/' . $random_id . '.jpg', 190, 190);
 resizeMyImage('uploads/' . $random_id . '.png', 'Final/' . $random_id . '.png', 190, 190);
 //$magicianObj1 = new imageLib('uploads/'.$random_id.'.jpg');
 //$magicianObj2 = new imageLib('uploads/'.$random_id.'.png');
 //$magicianObj1 -> resizeImage(170, 170);
 //$magicianObj2 -> resizeImage(140, 140);
 //$magicianObj1 -> saveImage('Final/'.$random_id.'.jpg', 100);
 //$magicianObj2 -> saveImage('Final/'.$random_id.'.png', 100);
 $filename1 = imagecreatefromjpeg('Final/' . $random_id . '.jpg');
 $filename2 = imagecreatefrompng('Final/' . $random_id . '.png');
 #echo $filename1;
 #echo $src;
 #int imagecopy ( resource dest_image, resource source_image, int dest_x, int dest_y, int source_x, int source_y, int source_width, int source_height)
 imagecopy($image1, $filename1, 755, 5, 0, 0, 190, 190);
 imagecopy($image1, $filename2, 540, 5, 0, 0, 190, 190);
 ImagePng($image1, 'Print/' . $random_id . '.jpg');
 #ImagePng($image1, $filename);