Solved

php image resize

Posted on 2013-06-13
5
352 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 6

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 6

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 6

Expert Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

895 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now