Re: Help - I can't create jpegs with GD
| From: | Rasmus Lerdorf | Date: | Thu, 01 Mar 2001 22:00:53 +0000 |
| Subject: | Re: Help - I can't create jpegs with GD | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-42297@lists.php.net to get a copy of this message | ||
They probably didn't build jpeg support into their gd library.
On Thu, 1 Mar 2001, Cherie Benoit wrote:
> I can't create or manipulate jpegs, but pngs work fine. I am using a hosting
> service. They installed GD 1.8.4 with jpeg support a few days ago, but I'm
> thinking they did it wrong. I'm using code I know works because it's
> straight out of the PHP Cookbook. What do I need to tell them to correct the
> problem?
>
>
> phpinfo() tells me this:
> './configure'
> '--with-gd=/opt/local/src/gd-1.8.4'
> '--with-config-file-path=/usr/local/lib'
> '--with-ttf=/opt/local/src/freetype-1.3.1'
> '--with-jpeg-dir=/opt/local/src/jpeg-6b'
> '--libdir=/usr/local/lib/'
>
> This is the code I've tried:
> <?php
> header("Content-type: image/jpeg");
> if (($im = ImageCreateFromJpeg("test.jpeg")) == "") {
> echo "error opening file";
> exit;
> }
> $red = ImageColorAllocate($im, 255, 0, 0);
> ImageString($im, 3, 20, 10, "Hi", $red);
> ImageJpeg($im);
> ?>
>
>
> Thanks!
> --
> Cherie Benoit
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>