WMDE contract offers/Implement full support for TIFF files
- Done: Extension:PagedTiffHandler.
Currently, MediaWiki does not support TIFF-Files. TIFF is a standard format for print and reproduction as well as in many research fields (compare m:Restoration.wikimedia.org). It would be nice if uploading and displaying TIFF images was supported. TIFF supports multiple images per file, so it will have to be handled similar to DjVu files.
TIFF is an image file format, that may contain multiple images per file. TIFF support should thus be implemented similar to the way DjVu support is handled. Specifically, ther following functionality should be covered:
- Upload and validate TIFF files. During validation, any unwanted content embedded in the TIFF file should be detected and the file rejected as a result. This is important since TIFF is a container format that can contain any kind of data. This has in the past been abused to transfer malicious code.
- Extraction of meta-data (analogous to EXIF for JPEG), if useful. At the very least, the resolution of the images as well as the number of pages contained in the file must be determined.
- Embedding of the image in Wikitext, just like JPEG, PNG, DjVu, etc. This means implementing the thumbnailing facility, which can probably rely on ImageMagick.
- Embedding of a specific page from the TIFF file, using the syntax page=x, just like for DjVu. IF not given, the first page should be shown.
- Appropriate functionality for the description page:
- Display of the image on the image discription page. This should be trivial/automatic if thumbnailing is implemented.
- It shall be possible to navigate/browse all pages of the TIFF file on the description page, just like for DjVu files.
- Download link to the original TIFF file (should be trivial)
- Integration with the ProofreadPage extension, analoguous to DjVu.
Many of the features refer top the fact that TIFFs may contain multiple pages, just like DjVu files. IT would therefore be good to factor out support for multi-page filers and use the same code for both, DjVu and TIFF. Perhaps a common superclass, MultiPageRasterImage, would be useful. Perhaps it cvould be used for other formats in the future, e.g. for PDF.
The TIFF-Format is often used for archiving original raw scans, which can be very large,m both in resolution and in file size. The thumbnailing facility should support a maxiumum file size and/or resolution for which thumbnailing will be attempted, similar to the way this is handled for PNG files.
It might be useful to have an explicit "archival" flag, that prevents thumbnailing. This would apply to all image formats but should be attached to individual revisions. However: Who should have permission to change this flag?
Better still, a intermediate preview could be rendered on upload, and thumbnails can be created from that. But handling for very large files is not the prime objective of this project.
See WMDE contract offers for how to apply for a contract.