News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
Crop and Resize Images with ImageMagick
May 02, 2013 @ 12:14:51

PHPMaster.com has a new tutorial posted showing you how to crop and resize images with the help of the ImageMagick functionality that can be added to PHP (via this extension).

If your website allows users to upload photos, image cropping/resizing functionality certainly comes in handy. But users might not have access to image manipulation tools like Photoshop, so by providing a cropping/resizing feature you can allow users to upload photos from any device (e.g. tablets or phones) without them having to worry about the the final size. Furthermore, you can create different versions of the same image and also allow users to crop specific portions of uploaded picture. In this article I'll show you how to create an image cropping tool with the help of the ImageMagick PHP extension.

The post shows the use of the "cropimage" function to trim down an image from its original size and "thumbnailImage" to shrink down the image to make a thumbnail. Also included is the code (both the PHP and the HTML form) to handle file uploads and automatically create a thumbnail image. It outputs the image to the browser and asks the user to select the portion they want thumbnailed (with this jQuery plugin helping).

0 comments voice your opinion now!
crop image imagemagick tutorial resize extension

Link: http://phpmaster.com/crop-and-resize-images-with-imagemagick

blog comments powered by Disqus

Similar Posts

Hasin Hayder's Blog: Using OAuth PECL Extension to Talk to Twitter

Christian Stocker's Blog: Added xslt profiling to PHP 5.3 and 6 CVS

NetTuts.com: Protect a CodeIgniter Application Against CSRF

IBM developerWorks: Integrate Google Book Search into a PHP application

Gonzalo Ayuso: Building a Silex application from one Behat/Gherkin feature file


Community Events





Don't see your event here?
Let us know!


series bugfix framework laravel developer release wordpress library code language community application podcast install api list configure threedevsandamaybe interview introduction

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework