Q:

ImageMagick PHP need a good quality thumbnail generation

I am using php imagemagick to generate thumbnail image. 

If i give bestfit true and size is 50x50 it generating 36x50 size image(good quality) 
if i give bestfit false and size is 50x50 it generating 50x50 size image(bad quality) 

I need a solution that whatever the image size(minimum i will upload 200X200) i give
it need to give 50x50 with good quality and techniques there in ImageMAgick ??

A:

Take a look at PHP Thumb (MIT license). 
It supports Adaptive Resizing.
What it does is resize the image to get as close as possible to the desired dimensions, then crops the image down to the proper size from the center.
require_once '/path/to/ThumbLib.inc.php';  

$thumb = PhpThumbFactory::create('test.jpg');  
$thumb->adaptiveResize(50, 50)->save('/path/to/new_thumb.jpg');  

PHP Thumb is a light-weight image
  manipulation library aimed at
  thumbnail generation. It features the
  ability to resize by width, height,
  and percentage, create custom crops,
  or square crops from the center, and
  rotate the image.

PHP Thumb Github WIKI

