Tiff.php 636 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * @file
  4. * @ingroup Media
  5. */
  6. /**
  7. * @ingroup Media
  8. */
  9. class TiffHandler extends BitmapHandler {
  10. /**
  11. * Conversion to PNG for inline display can be disabled here...
  12. * Note scaling should work with ImageMagick, but may not with GD scaling.
  13. */
  14. function canRender( $file ) {
  15. global $wgTiffThumbnailType;
  16. return (bool)$wgTiffThumbnailType;
  17. }
  18. /**
  19. * Browsers don't support TIFF inline generally...
  20. * For inline display, we need to convert to PNG.
  21. */
  22. function mustRender( $file ) {
  23. return true;
  24. }
  25. function getThumbType( $ext, $mime ) {
  26. global $wgTiffThumbnailType;
  27. return $wgTiffThumbnailType;
  28. }
  29. }