Is it possible to write text to an image using imagecreatefrom png() like here and merge the image produced with icon.png for example, in one go?
The output of this PHP produced the image in the link above, I'm looking to merge this output with $icon below:
Any suggestions, what code would I need to imagecopymerge with $icon?
The output of this PHP produced the image in the link above, I'm looking to merge this output with $icon below:
Code:
<?php $bg = $_REQUEST['bg'] ; $my_img = imagecreatefromjpeg( $bg); $text_colour = imagecolorallocate( $my_img, 255, 255, 255 ); $input_text = $_REQUEST['name'] ; [B]$icon = imagecreatefrompng('sun.png');[/B] imagestring( $my_img, 10, 30, 32, $input_text, $text_colour ); imagesetthickness ( $my_img, 5 ); header( "Content-type: image/png" ); imagepng( $my_img ); imagecolordeallocate( $text_color ); imagedestroy( $my_img ); ?>