Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] PHP Image Creation problems & MacOSX



The PHP that is installed on Mac OS X does have GD in it, but not GD with GIF. No recent versions of GD have GIF in them, unless they have been patched, because the maker of GD removed GIF when Unisiys started getting cranky about their patent on that format.

You can create a JPEG or a PNG, but not a GIF.

Walter

On Oct 19, 2003, at 5:39 PM, Eric Gorr wrote:

I've got a fairly simple php script which creates a simple gif image.
Now, if I use this script on my primary webhost, everything works
correctly and the image is created.

However, I would also like to see it working on my local machine and in
this case, I just get back the standard broken image icon.

I am guessing something is not configured properly, but I am uncertain
as to what that might be. Although, I'm pretty sure it has to do with that GD is not installed automatically with the standard Apache/PHP installation under MacOSX.


Assuming this is it, what is the best way to get GD up and running with PHP?

Otherwise, does anyone have any ideas?

Here's the php script...

<?php
header ("Content-type: image/gif");
$im = imagecreate (50, 100);
$background_color = imagecolorallocate ($im, 255, 255, 255);
$text_color = imagecolorallocate ($im, 233, 14, 91);
imagestring ($im, 1, 5, 5, "A Simple Text String", $text_color);
imagegif ($im);
imagedestroy ($im);
?>
_______________________________________________
web-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/web-development
Do not post admin requests to the list. They will be ignored.
_______________________________________________
web-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/web-development
Do not post admin requests to the list. They will be ignored.

References: 
 >[Q] PHP Image Creation problems & MacOSX (From: Eric Gorr <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.