Imagick - cropThumbnailImage does not use fixed sizes (the height always dynamic)

     

I use the Imagick's cropThumbnailImage() method to create thumbnail image from different size of uploaded pictures by the users.


Unfortunately it never crop the thumbnail image at the center... it always just resize by the width value. So the width value always fix but the height not.


I want to achieve that the height will be fixed too.


$this->image = new Imagick($filePath);   $this->image->cropThumbnailImage(200 200);   $this->image->stripImage();   $this->image->writeImage($filePath);  

where the thumbnail image's width always 200px