From f6d65e533c62f6deb21342d4901ece24497b433e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 4 Jun 2015 07:31:04 +0200 Subject: Update to MediaWiki 1.25.1 --- includes/filerepo/file/UnregisteredLocalFile.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'includes/filerepo/file/UnregisteredLocalFile.php') diff --git a/includes/filerepo/file/UnregisteredLocalFile.php b/includes/filerepo/file/UnregisteredLocalFile.php index 5a3e4e9c..4c11341b 100644 --- a/includes/filerepo/file/UnregisteredLocalFile.php +++ b/includes/filerepo/file/UnregisteredLocalFile.php @@ -165,6 +165,18 @@ class UnregisteredLocalFile extends File { return $this->handler->getImageSize( $this, $this->getLocalRefPath() ); } + /** + * @return int + */ + function getBitDepth() { + $gis = $this->getImageSize( $this->getLocalRefPath() ); + + if ( !$gis || !isset( $gis['bits'] ) ) { + return 0; + } + return $gis['bits']; + } + /** * @return bool */ -- cgit v1.2.3-54-g00ecf