Index: trunk/phase3/CREDITS |
— | — | @@ -6,6 +6,7 @@ |
7 | 7 | * Alexandre Emsenhuber |
8 | 8 | * Aryeh Gregor |
9 | 9 | * Brion Vibber |
| 10 | +* Bryan Tong Minh |
10 | 11 | * Chad Horohoe |
11 | 12 | * Greg Sabino Mullane |
12 | 13 | * Hojjat |
Index: trunk/phase3/includes/filerepo/LocalFile.php |
— | — | @@ -453,6 +453,11 @@ |
454 | 454 | return $this->metadata; |
455 | 455 | } |
456 | 456 | |
| 457 | + function getBitDepth() { |
| 458 | + $this->load(); |
| 459 | + return $this->bits; |
| 460 | + } |
| 461 | + |
457 | 462 | /** |
458 | 463 | * Return the size of the image file, in bytes |
459 | 464 | * @public |
Index: trunk/phase3/includes/filerepo/File.php |
— | — | @@ -264,9 +264,16 @@ |
265 | 265 | * Overridden by LocalFile, UnregisteredLocalFile |
266 | 266 | * STUB |
267 | 267 | */ |
268 | | - function getMetadata() { return false; } |
| 268 | + public function getMetadata() { return false; } |
269 | 269 | |
270 | 270 | /** |
| 271 | + * Return the bit depth of the file |
| 272 | + * Overridden by LocalFile |
| 273 | + * STUB |
| 274 | + */ |
| 275 | + public function getBitDepth() { return 0; } |
| 276 | + |
| 277 | + /** |
271 | 278 | * Return the size of the image file, in bytes |
272 | 279 | * Overridden by LocalFile, UnregisteredLocalFile |
273 | 280 | * STUB |
Index: trunk/phase3/includes/api/ApiQueryImageInfo.php |
— | — | @@ -148,6 +148,9 @@ |
149 | 149 | |
150 | 150 | if( isset( $prop['archivename'] ) && $file->isOld() ) |
151 | 151 | $vals['archivename'] = $file->getArchiveName(); |
| 152 | + |
| 153 | + if( isset( $prop['bitdepth'] ) ) |
| 154 | + $vals['bitdepth'] = $file->getBitDepth(); |
152 | 155 | |
153 | 156 | return $vals; |
154 | 157 | } |
— | — | @@ -166,7 +169,8 @@ |
167 | 170 | 'sha1', |
168 | 171 | 'mime', |
169 | 172 | 'metadata', |
170 | | - 'archivename' |
| 173 | + 'archivename', |
| 174 | + 'bitdepth', |
171 | 175 | ) |
172 | 176 | ), |
173 | 177 | 'limit' => array( |
Index: trunk/phase3/includes/api/ApiQueryAllimages.php |
— | — | @@ -162,7 +162,8 @@ |
163 | 163 | 'dimensions', // Obsolete |
164 | 164 | 'mime', |
165 | 165 | 'sha1', |
166 | | - 'metadata' |
| 166 | + 'metadata', |
| 167 | + 'bitdepth', |
167 | 168 | ), |
168 | 169 | ApiBase :: PARAM_DFLT => 'timestamp|url', |
169 | 170 | ApiBase :: PARAM_ISMULTI => true |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -56,6 +56,7 @@ |
57 | 57 | or other engine which doesn't support a separate title search function. |
58 | 58 | This means you can use API search on Wikipedia without explicitly adding |
59 | 59 | &srwhat=text to the query. |
| 60 | +* Added iiprop=bitdepth to imageinfo and aiprop=bitdepth to allimages |
60 | 61 | |
61 | 62 | |
62 | 63 | === Languages updated in 1.14 === |