php image resize

Is there a built in php function that lets you resize an image to a specific width & height?

Even better, give it one or the other & it retains the aspect ratio?

Thanks
Richard KortsAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Robert SaylorConnect With a Mentor Senior DeveloperCommented:
0
 
Robert SaylorSenior DeveloperCommented:
You could use GD or imagemagic. Image magic is really easy to use but would require exec from the command prompt. GD does not require that but is more code. If you look at ImageMagic look at "convert".

Version: ImageMagick 6.7.2-5 2011-09-13 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP

Usage: convert [options ...] file [ [options ...] file ...] [options ...] file
0
 
Richard KortsAuthor Commented:
I have GD; what is the syntax there?

It seems I've done this before. Isn't there a function like imageresize?

Thanks
0
 
Richard KortsAuthor Commented:
That's it, I've used it before.

Thanks!
0
 
Robert SaylorSenior DeveloperCommented:
No problem :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.