News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
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 code trim image extra background imagick example code



Similar Posts

Developer Tutorials: Easy PDF Generation in PHP

Sebastian Bergmann's Blog: Integrating PHPUnit with Selenium

Zend Developer Zone: Data Migration and Import Examples

Jonnay\'s Blog: An issue with PHP\'s error handling

Mikko Koppanen's Blog: Trimming an image


Community Events







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


job release framework PHP5 book application database cakephp zendframework ajax developer code package zend security example conference PEAR mysql releases

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