Solved

php image resize

Posted on 2013-06-13
5
364 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
This article discusses how to implement server side field validation and display customized error messages to the client.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

617 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