code/Model/ThumbnailGenerator.php
public function generateThumbnail(AssetContainer $file, $width, $height)
    {
        if (!$file->getIsImage() || !$file->exists()) {
            return null;
        }

        // Disable generation if only querying existing files
        if (!$this->getGenerates()) {
            $file = $file->existingOnly();
        }

        // Make large thumbnail
        return $file->FitMax($width, $height);
    }
public function generateThumbnail(AssetContainer $file, $width, $height)
    {
        if (!$file->getIsImage() || !$file->exists()) {
            return null;
        }

        // Disable generation if only querying existing files
        if (!$this->getGenerates()) {
            $file = $file->existingOnly();
        }

        // Make large thumbnail
        return $file->FitMax($width, $height);
    }
public function generateThumbnail ( AssetContainer $ file , $ width , $ height ) { if ( ! $ file -> getIsImage ( ) || ! $ file -> exists ( ) ) { return null ; } // Disable generation if only querying existing files if ( ! $ this -> getGenerates ( ) ) { $ file = $ file -> existingOnly ( ) ; } // Make large thumbnail return $ file -> FitMax ( $ width , $ height ) ; }
Generate thumbnail object

@param AssetContainer|DBFile|File $file
@param int $width
@param int $height
@return AssetContainer|DBFile|File
Generate thumbnail object