News Feed
Sections




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

Mikko Koppanen's Blog:
Trimming an image
November 02, 2007 @ 12:58:00

Mikko Koppanen shows how, in his latest blog post, to take an image and trim it down with Imagick to get rid of extra surrounding background information.

Especially product images usually "suffer" from this issue; the product itself is composited on a white background and there are large areas of white around the object.

This is a simple example to demonstrate how to easily trim the areas off the image and only display the parts where the object lies.

His example code, a quick 16 line affair, takes in the test image, looks for a RGB value given and uses the built-in trimImage function to reduce its size.

0 comments voice your opinion now!
trim image extra background imagick example trim image extra background imagick example


blog comments powered by Disqus

Similar Posts

Christian Stocker's Blog: Upload Progress Meter extension 0.9.2 released

PHPit.net: Having fun with PHP\'s output buffer

Zend Developer Zone: Accessing DB2 Data Inside of i5/OS

Paul Stamatiou's Blog: 5 Ways to Speed Up Your Site

Knut Urdalen's Blog: ORM the manual way


Community Events





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


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

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