dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Remove usages of RequestContext::getStats()"
[lhc/web/wiklou.git]
/
includes
/
filerepo
/
file
/
UnregisteredLocalFile.php
diff --git
a/includes/filerepo/file/UnregisteredLocalFile.php
b/includes/filerepo/file/UnregisteredLocalFile.php
index
5a3e4e9
..
5ee25cd
100644
(file)
--- a/
includes/filerepo/file/UnregisteredLocalFile.php
+++ b/
includes/filerepo/file/UnregisteredLocalFile.php
@@
-103,7
+103,7
@@
class UnregisteredLocalFile extends File {
if ( $mime ) {
$this->mime = $mime;
}
if ( $mime ) {
$this->mime = $mime;
}
- $this->dims =
array()
;
+ $this->dims =
[]
;
}
/**
}
/**
@@
-165,6
+165,18
@@
class UnregisteredLocalFile extends File {
return $this->handler->getImageSize( $this, $this->getLocalRefPath() );
}
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
*/
/**
* @return bool
*/