code: public static final function generateThumbnail(
              $file, 
              array $size = array('width' => 168, 'height' => 120, 'fit' => 'outside'),
              array $crop = array('left' => 'center', 'top' => 'middle')
      ) {
          if(!empty($file->original_destination) && isset($size['width']) && isset($size['height'])) {
  
              // ie. string(47) "/var/www/vegas/public/uploads/5326acd311dd4.jpg"
              $filePath = $file->original_destination . '/' . $file->temp_name;
  
              if (!is_dir($file->original_destination . '/thumbnails')) {
                  mkdir($file->original_destination . '/thumbnails', 0777, true);
              }
              
              // Make sure we have a fit parameter
              if(!isset($size['fit'])) {
                  $size['fit'] = 'outside';
              }        
              
              // Make sure we have the crop parameters
              if(!isset($crop['left'])) {
                  $crop['left'] = 'center';
              }
              if(!isset($crop['top'])) {
                  $crop['top'] = 'middle';
              }
  
              // Use default output quality when not provided
              if (!isset($size['quality'])) {
                  $size['quality'] = null;
              }
  
              $thumbFilePath = $file->original_destination . '/thumbnails/' . $size['width'] . '_' . $size['height'] . '_' . $file->temp_name;
  
              (new Adapter\Imagick($filePath))
                  ->resize($size['width'], $size['height'], $size['fit'])
                  ->crop($size['width'], $size['height'], $crop['left'], $crop['top'])
                  ->save($thumbFilePath, $size['quality']);
          }
      }
docs: Generates a thumbnails of the images in the following location:
  {ORIGINAL_DESTINATION_OF_THE_FILE}/thumbnails/filename.{ext}
  
  @param \stdClass $file
  @param array $size The resize parameters  (width, height, fit)
  @param array $crop The cropping parameters (left, top)