ID: 50535 Updated by: ras...@php.net Reported By: bobkellock at gofast dot co dot uk -Status: Open +Status: Bogus Bug Type: GD related Operating System: Win XP SP2 PHP Version: 5.2.12 New Comment:
Are you sure your image isn't actually broken? Where would the string, "Image" come from? And why do you think you can emit a header after you have sent the image? This bug report makes no sense, sorry. Previous Comments: ------------------------------------------------------------------------ [2009-12-20 01:03:11] bobkellock at gofast dot co dot uk Description: ------------ PHP version is actually 5.2.10 which is what is run on the server at One.com but is due to be upgraded to 5.3 on 2010-01-04. imagecreatefromjpeg and other imagecreatefromxxx functions put up "Image" in a small rectangle on the centre of the screen. This is unsightly in my application which simply creates the image and overlays it with some text using imagestring followed by writing the overlaid image to a file. i.e. the original or overlaid image is never written to the screen. Bob Kellock Reproduce code: --------------- header('Content-Type: image/jpg'); $serial = "CL1949F"; // normally passed as a session variable $img = imagecreatefromjpeg('blankorder.jpg'); $textcolour = imagecolorallocate($img, 0, 0, 0); $font = imageloadfont('Arial24.gdf'); imagestring($img, $font, 535, 312, $serial, $textcolour); imagejpeg($img,'orderform.jpg'); imagedestroy($img); header('refresh: 0; url=stamped.html'); // redirect to new page Expected result: ---------------- Creation of overlaid file - which works OK. Screen should be blank. Actual result: -------------- "Image" in a small rectangle is displayed ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50535&edit=1