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.