PHP Image Resize

They have: 4 posts

Joined: Jul 2002

Hi all, long time since i have been here
any way thought i would pay a visit and ask a question

How in php do i resize an image on the server for a thumnail view, all the scrips i find on the net just error out.

eg
Fatal error: Call to undefined function: imagecreatefromjpeg() in /home/users/makouraftp/temp/test1.php on line 11

i duno whats rong.

what am i doing rong

ps i have only been coding php for about 2 months

thanks Josh

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

I'd need to see more of your code, but the error seems to indicated that your function is not defined.

what is imagecreatefromjpeg()?

They have: 4 posts

Joined: Jul 2002

Thats the thing
i have tryed about 10 different scrips from around the web, and none of them work

and acordin to the php manual
ImageCreateFromJPEG(PHP 3>= 3.0.16, PHP 4 >= 4.0RC1)
Create a new image from file or URL

is a built in php function ??

im not looking for a fix to my current script, cause i dont have one, im looking more for a pointer on how to write the scrips, which method of image resizing to use, from what i have seen there are many ways to do it

which should i use, and how

thanks josh

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

I'm not sure but I think for image manipulation you require to have the GD library installed...

Have a look at this article from WebMonkey:

http://hotwired.lycos.com/webmonkey/01/21/index4a.html?tw=programming

They have: 4 posts

Joined: Jul 2002

the gd libary is installed

what does an "@" meen when it is placed infront of a function ??

They have: 4 posts

Joined: Jul 2002

All solved it was a problem with the server i use they dident have a module loaded
thanks for all you help

mairving's picture

They have: 2,256 posts

Joined: Feb 2001

Quote: Originally posted by JLS
the gd libary is installed

what does an "@" meen when it is placed infront of a function ??

FYI, the @ means to suppress error output.

Mark Irving
I have a mind like a steel trap; it is rusty and illegal in 47 states

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.