Op Mon, 17 Dec 2007 05:34:34 +1100
Tim Starling <tstarling(a)wikimedia.org> Schreef:
Kris Coryn (Mailinglists) wrote:
[...]
just a convertion from YinYang_symbool_bw.tif to
300px-YinYang_symbool_bw.tif but because the code have not
added .png ImageMagick convert has not converted it to png
[...]
but i 'm not so good in pointer variable and
how to follow to the
right function to change?
Like this:
class TiffHandler extends BitmapHandler {
function getThumbType( $ext, $mime ) {
return array( 'png', 'image/png' );
}
}
Ok but where i have to put this .....searching....
founded i put it in a file media/Tiff.php
and added a line in Autoloader.php Media part
ok thats working for the pages with pictures on it
but the original picture page is'nt converted to png because the log says
"returning unscaled image"
i added a check if it is a tiff format not to return in Bitmap.php file and so the tiff
is converted to a browser viewable png format
wfDebug( __METHOD__.": creating {$physicalWidth}x{$physicalHeight}
thumbnail at $dstPath\n" );
if ( $physicalWidth == $srcWidth && $physicalHeight == $srcHeight
&& $mimeType !== 'image/tiff' ) {
# normaliseParams (or the user) wants us to return the unscaled
image
wfDebug( __METHOD__.": returning unscaled image\n" );
return new ThumbnailImage( $image, $image->getURL(),
$clientWidth, $clientHeight, $srcPath );
But i do not understand why he doesn't scale down the image from 943 × 1262 to 448x600
like in the 1.8.2 version from mediawiki
Ok Thanks to look at my problem, but it is not working perfectly , maybe time for me to
stop using tiff file while i scan in my photo's and convert it to png with
quality=high so i do not lose the details.
i have only 82 tiff file to process and upload again but if i use png format i have not to
worry again to patch mediawiki if i do a upgrade again to the latest version.
I have also take a look to the DJVu format that is supported by mediawiki but i think it
is very good for scanned text but just for scanned image ? i have no advantaged compared
with the png format ? it also need a browser plugin and png is standard supported.
thanks tim for your time and the support.
$wgMediaHandlers['image/tiff'] =
'TiffHandler';
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/wikitech-l