Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"imagecreatetruecolor" question please

Status
Not open for further replies.

limi

Programmer
Joined
Feb 9, 2004
Messages
3
Location
US
hello,

I'm trying to turn a swf file into a jpeg.
the swf movie works fine and when i click a button to call on a php page that converts it to a jpeg an error msg comes up saying that magecreatetruecolor is undefined.
I searched for a solution online and realized i should try to use imagecreate instead (something with GD support). it still gave me the same msg.
i tried to add "@" before the action name and then the page came up w/o error but it was blank! no jpeg image of my swf.
here is that part of the code:

$image = @imagecreatetruecolor(300,200);
$imagelines = @imagecreate(300,200);

(as mentioned i tried it with and w/o the "@")
in my code the imagecreatetruecolor appears black (like it doesn't
recognize it) but the imagecreate is blue; nevertheless, the "undefined" error message still come up.

what could it be?
how do i define it?
Thank you,
 
Are you sure that the GD libraries are loaded with your php config? In my php.ini I have the line:
extension=php_gd.dll
This is commented out by default.

Do a search in your php.ini of "gd" and see if its just been commented out.
 
I should point out that this is on a WinXP machine. Its probably different if you are using linux
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top