/**
  * Returns filename for a cached thumbnail, calculated
  * by its properties and dimensions.
  *
  * @param sfFilebasePluginFile $file
  * @param array $thumbnail_properties
  * @return sfFilebasePluginImage $filename
  */
 public function getThumbnailFileinfo(sfFilebasePluginImage $file, $dimensions, $mime)
 {
     $thumbnail_properties = $this->getScaledImageData($file, $dimensions);
     // Wrap in sfFilebasePluginImage because isImage may return false if file does not exist.
     return new sfFilebasePluginThumbnail($this->filebase->getFilebaseFile($this->filebase->getCacheDirectory() . DIRECTORY_SEPARATOR . $this->filebase->getHashForFile($file) . '_' . $thumbnail_properties['new_width'] . '_' . $thumbnail_properties['new_height'] . '.' . (sfFilebasePluginUtil::getExtensionByMime($mime) === null ? $thumbnail_properties['extension'] : sfFilebasePluginUtil::getExtensionByMime($mime))), $this->filebase, $file);
 }