Solved

php image resize

Posted on 2013-06-13
5
356 Views
Last Modified: 2013-06-13
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
0
Comment
Question by:Richard Korts
  • 3
  • 2
5 Comments
 
LVL 7

Expert Comment

by:Robert Saylor
ID: 39245514
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
 

Author Comment

by:Richard Korts
ID: 39245526
I have GD; what is the syntax there?

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

Thanks
0
 
LVL 7

Accepted Solution

by:
Robert Saylor earned 500 total points
ID: 39245532
0
 

Author Closing Comment

by:Richard Korts
ID: 39245567
That's it, I've used it before.

Thanks!
0
 
LVL 7

Expert Comment

by:Robert Saylor
ID: 39245573
No problem :)
0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

823 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question