forked from GNUsocial/gnu-social
Use thumbnail upscaling config value
This commit is contained in:
parent
8806cce735
commit
733debd9b3
@ -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 UnsupportedMediaException if, despite trying, we can't understand how to make a thumbnail for this format
|
||||||
* @throws ServerException on various other errors
|
* @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
|
// Get some more information about this file through our ImageFile class
|
||||||
$image = ImageFile::fromFileObject($this);
|
$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()
|
public function getPath()
|
||||||
|
@ -263,6 +263,7 @@ $default =
|
|||||||
'maxsize' => 1000, // thumbs with an edge larger than this will not be generated
|
'maxsize' => 1000, // thumbs with an edge larger than this will not be generated
|
||||||
'width' => 450,
|
'width' => 450,
|
||||||
'height' => 600,
|
'height' => 600,
|
||||||
|
'upscale' => false,
|
||||||
'animated' => false), // null="UseFileAsThumbnail", false="can use still frame". true requires ImageMagickPlugin
|
'animated' => false), // null="UseFileAsThumbnail", false="can use still frame". true requires ImageMagickPlugin
|
||||||
'application' =>
|
'application' =>
|
||||||
array('desclimit' => null),
|
array('desclimit' => null),
|
||||||
|
Loading…
Reference in New Issue
Block a user