36 private const EXPENSIVE_SIZE_LIMIT = 10_485_760;
50 $tiffThumbnailType = MediaWikiServices::getInstance()->getMainConfig()
51 ->get( MainConfigNames::TiffThumbnailType );
53 return (
bool)$tiffThumbnailType
75 $tiffThumbnailType = MediaWikiServices::getInstance()->getMainConfig()
76 ->get( MainConfigNames::TiffThumbnailType );
78 return $tiffThumbnailType;
82 $showEXIF = MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::ShowEXIF );
86 if ( !is_array( $meta ) ) {
91 'width' => $meta[
'ImageWidth'] ?? 0,
92 'height' => $meta[
'ImageLength'] ?? 0,
97 $info[
'metadata'] = $meta;
103 wfDebug( __METHOD__ .
': ' . $e->getMessage() );
110 return $file->getSize() > static::EXPENSIVE_SIZE_LIMIT;
wfDebug( $text, $dest='all', array $context=[])
Sends a line to the debug log if enabled or, optionally, to a comment in output.
array $params
The job parameters.
Stuff specific to JPEG and (built-in) TIFF handler.
applyExifRotation( $info, $metadata)
const BROKEN_FILE
Error extracting metadata.
static version()
The version of the output format.
A foreign repository for a remote MediaWiki accessible through api.php requests.
A class containing constants representing the names of configuration variables.
isExpensiveToThumbnail( $file)
True if creating thumbnails from the file is large or otherwise resource-intensive.
getThumbType( $ext, $mime, $params=null)
canRender( $file)
Conversion to PNG for inline display can be disabled here... Note scaling should work with ImageMagic...
mustRender( $file)
Browsers don't support TIFF inline generally... For inline display, we need to convert to PNG.
getSizeAndMetadata( $state, $filename)
Get image size information and metadata array.