image creation
Posted: Wed Oct 02, 2002 7:48 am
hi all again, i have a little prob. :p
i'm trying to learn imagecreate()
i know my webhoster supports gd library cause it says in phpinfo();
GD Support enabled
GD Version 1.6.2 or higher
FreeType Support enabled
FreeType Linkage with freetype
JPG Support enabled
PNG Support enabled
WBMP Support enabled
but when i try this(from a tutorial)
when i load up image.php it asks for me to download the file? i can view other php. files prefectly. but not this one.
when i tried include it sometimes ask me to download the file. or comes up with alot of weird characters.
help? :p
i'm using f2o as my hoster. and they have php 4.2.2.
Thanks
Coca-Bear
i'm trying to learn imagecreate()
i know my webhoster supports gd library cause it says in phpinfo();
GD Support enabled
GD Version 1.6.2 or higher
FreeType Support enabled
FreeType Linkage with freetype
JPG Support enabled
PNG Support enabled
WBMP Support enabled
but when i try this(from a tutorial)
Code: Select all
<HTML>
<HEAD>
<TITLE> Images Creation </TITLE>
</HEAD>
<BODY>
<?php
Header("Content-Type: image/jpg");
$im = ImageCreate(100, 100);
$black = ImageColorAllocate($im, 0, 0, 0);
$white = ImageColorAllocate($im, 255, 255, 255);
ImageLine($im, 1, 1, 99, 99, $white);
Imagejpeg($im);
ImageDestroy($im);
?>
</BODY>
</HTML>when i tried include it sometimes ask me to download the file. or comes up with alot of weird characters.
help? :p
i'm using f2o as my hoster. and they have php 4.2.2.
Thanks
Coca-Bear