diff options
Diffstat (limited to 'includes/media/Tiff.php')
-rw-r--r-- | includes/media/Tiff.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/includes/media/Tiff.php b/includes/media/Tiff.php new file mode 100644 index 00000000..9d3fbb78 --- /dev/null +++ b/includes/media/Tiff.php @@ -0,0 +1,33 @@ +<?php +/** + * @file + * @ingroup Media + */ + +/** + * @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 ) { + global $wgTiffThumbnailType; + return $wgTiffThumbnailType; + } +} |