I am having the same issue.
I just installed the latest WAMP
Windows 2003 Server
I transfered over a number of PHP scripts I had on a different Apache2 server and all worked well the last couple weeks, now I am experimenting with some graphic manipulation, or at least trying to.
I enabled the GD library first manually, then by simply using the check mark in the WAMP control panel on php_gd2
The entire code of what I'm trying is:
<?php
header("Content-type: image/png"
;
$string = "Text";
$im = imagecreatefrompng("images/button1.png"
;
$orange = imagecolorallocate($im, 220, 210, 60);
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
imagestring($im, 3, $px, 9, $string, $orange);
imagepng($im);
imagedestroy($im);
?>
No blank lines or spaces either before or after the code.
When I go to the URL I get:
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\mcmirror\imgtest.php:1) in C:\wamp\www\mcmirror\imgtest.php on line 2
�PNG IHDR,,�"�IDATx���AJ�P@Q+]�[p ���܂����'�B��ͳ���' �\^�9���'��\?<:BL�!�D1BL�!�D1BL�;�� /oW+�����o�"!�=��#�!�I��{��x�&ᦙ SqI���IEND�B`�
Any ideas?
Thanks
Oh and when I do the var dump I get:
array(12) { ["GD Version"]=> string(27) "bundled (2.0.28 compatible)" ["FreeType Support"]=> bool(true) ["FreeType Linkage"]=> string(13) "with freetype" ["T1Lib Support"]=> bool(true) ["GIF Read Support"]=> bool(true) ["GIF Create Support"]=> bool(true) ["JPG Support"]=> bool(true) ["PNG Support"]=> bool(true) ["WBMP Support"]=> bool(true) ["XPM Support"]=> bool(false) ["XBM Support"]=> bool(true) ["JIS-mapped Japanese Font Support"]=> bool(false) }
Post Edited (03-23-07 16:18)
-Joe D