/**
  * Create a thumbnail from a file
  *
  * @param  string $file
  * @param  string $thumb
  * @param  int    $size
  */
 protected function createThumb($file, $thumb, $size)
 {
     // open file a image resource
     $img = ImageLib::make($file);
     // crop the best fitting 1:1 ratio and resize to the size given
     $img->grab($size);
     // save the same file as jpeg with default quality
     $img->save($thumb);
 }