I have copied and pasted a number of different PHP scripts that I have found on the internet. I am trying to create an image from PHP and display it in the browser. All I get is garbage displayed:
ÿØÿà�JFIF������ÿþ�>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality ÿÛ�C�aaaa $.’ ",#(7),01444’9=82<.342ÿÛ�C 2!!22222…
I tried both with local host and a remote server to see if it was a set up with my local installation of PHP. Both PHP installations have GD support enabled as shown by running phpinfo():
GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.3.4
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
I read one place that you have to resize the image file or it will display as garbage, but it seems strange that none of the tutorials would include the resizing code. Any thoughts? Thanks!