summaryrefslogtreecommitdiff
path: root/includes/media/Tiff.php
blob: 8773201f7627ee393c0e361bceabce82e4ee0e72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
 * Handler for Tiff images.
 *
 * @file
 * @ingroup Media
 */

/**
 * Handler for Tiff images.
 *
 * @ingroup Media
 */
class TiffHandler extends BitmapHandler {

	/**
	 * Conversion to PNG for inline display can be disabled here...
	 * Note scaling should work with ImageMagick, but may not with GD scaling.
	 */
	function canRender( $file ) {
		global $wgTiffThumbnailType;
		return (bool)$wgTiffThumbnailType;
	}

	/**
	 * Browsers don't support TIFF inline generally...
	 * For inline display, we need to convert to PNG.
	 */
	function mustRender( $file ) {
		return true;
	}

	function getThumbType( $ext, $mime, $params = null ) {
		global $wgTiffThumbnailType;
		return $wgTiffThumbnailType;
	}
}