imagecreatefromjpeg()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ktrout
Forum Newbie
Posts: 9
Joined: Sun Nov 03, 2002 6:27 pm
Location: new york

imagecreatefromjpeg()

Post by ktrout »

I understand that something needs to be done to use this function successfully? What needs to be done and how? My web hosting is on earthlink.

thank you...
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

GD

Post by AVATAr »

i think you need the GD library compiled with php...
ktrout
Forum Newbie
Posts: 9
Joined: Sun Nov 03, 2002 6:27 pm
Location: new york

compiling with gd library

Post by ktrout »

Thanks for the reply... how do I do that exactly? Something i can do or something I have to ask Earthlink to do?
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

I doubt ISP hosts give you php support, i know of none that do. Maybe in a few years time everyone will run php as a standard neccesity instead of charging loads more cash per month, but that ain't happening right now.

If it does support php, i suggest as he said and use the GD library, you can grab it from http://www.php.net

Once that is up, the functions that go along with it will be enabled on your server for your use. If you have php without it, i don't think any image creation funcs work.
ktrout
Forum Newbie
Posts: 9
Joined: Sun Nov 03, 2002 6:27 pm
Location: new york

using gd lib

Post by ktrout »

Hi, forgive my ignorance, but that is my question: how do i "use gd lib"? where can i find the instructions, and where exactly is it on php.net? the standard php download or is it available separately?.. thanks..
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Information on using the GD functions:
http://www.php.net/manual/en/ref.image.php

If you want to see if your host has GD installed (and what else they've done to configure PHP) put a file containing the following:

Code: Select all

<?php phpinfo(); ?>
in you webspace and run it.

To get a copy of GD on your local machine depends on your OS. If you are using Windows installing the PHP 4.2.3 zip package which comes with loads of extensions for PHP including GD 1.8 and 2. For *nix you should just be able to compile the code linked to from the image function reference page.

Mac
Post Reply