r68346 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68345‎ | r68346 | r68347 >
Date:10:19, 21 June 2010
Author:mglaser
Status:deferred
Tags:
Comment:
fixed bug where lossiness would not be considered in thumb file names
Modified paths:
  • /trunk/extensions/PagedTiffHandler/PagedTiffHandler_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PagedTiffHandler/PagedTiffHandler_body.php
@@ -214,9 +214,11 @@
215215 if ( $params['page'] > $this->pageCount( $image ) ) {
216216 $params['page'] = $this->pageCount( $image );
217217 }
218 - if ( !isset( $params['lossy'] ) ) {
219 - $params['lossy'] = null;
220 - }
 218+ if ( !isset( $params['lossy'] ) || $params['lossy'] == null ) {
 219+ $data = $this->getMetaArray( $image );
 220+ if ( ( strtolower( $data['page_data'][$params['page']]['alpha'] ) == 'true' ) ) $params['lossy'] = '0';
 221+ else $params['lossy'] = 1;
 222+ }
221223 $size = PagedTiffImage::getPageSize( $this->getMetaArray( $image ), $params['page'] );
222224 $srcWidth = $size['width'];
223225 $srcHeight = $size['height'];

Status & tagging log