We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 733debd9 authored by mattl's avatar mattl

Use thumbnail upscaling config value

parent 8806cce7
......@@ -416,7 +416,7 @@ class File extends Managed_DataObject
* @throws UnsupportedMediaException if, despite trying, we can't understand how to make a thumbnail for this format
* @throws ServerException on various other errors
*/
public function getThumbnail($width=null, $height=null, $crop=false, $force_still=true)
public function getThumbnail($width=null, $height=null, $crop=false, $force_still=true, $upscale=null)
{
// Get some more information about this file through our ImageFile class
$image = ImageFile::fromFileObject($this);
......@@ -428,7 +428,8 @@ class File extends Managed_DataObject
}
}
return $image->getFileThumbnail($width, $height, $crop);
return $image->getFileThumbnail($width, $height, $crop,
!is_null($upscale) ? $upscale : common_config('thumbnail', 'upscale'));
}
public function getPath()
......
......@@ -263,6 +263,7 @@ $default =
'maxsize' => 1000, // thumbs with an edge larger than this will not be generated
'width' => 450,
'height' => 600,
'upscale' => false,
'animated' => false), // null="UseFileAsThumbnail", false="can use still frame". true requires ImageMagickPlugin
'application' =>
array('desclimit' => null),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment