summaryrefslogtreecommitdiff
path: root/includes/media/Tiff.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2009-06-10 13:00:47 +0200
committerPierre Schmitz <pierre@archlinux.de>2009-06-10 13:00:47 +0200
commit72e90545454c0e014318fa3c81658e035aac58c1 (patch)
tree9212e3f46868989c4d57ae9a5c8a1a80e4dc0702 /includes/media/Tiff.php
parent565a0ccc371ec1a2a0e9b39487cbac18e6f60e25 (diff)
applying patch to version 1.15.0
Diffstat (limited to 'includes/media/Tiff.php')
-rw-r--r--includes/media/Tiff.php33
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;
+ }
+}