Display image without saving ( Anthony 14/6/2008 )
This code adds some text to an image and displays it in the browser without saving it.
GD code:
<?php $image = imagecreatefromjpeg( 'image.jpg' ); imagettftext( $image, 9, 0, 161, 72, -1, 'Arial.ttf', 'Some text' ); imagettftext( $image, 9, 0, 161, 105, -1, 'Arial.ttf', 'Some more text' ); header( "Content-Type: image/png" ); imagepng( $image ); imagedestroy( $image ); ?>