Hallo wikitech-l group,
can someone here look what is going on with the tif supported code, it doesn't convert anymore in 1.11.0 "MediaHandler::getHandler: no handler found for image/tiff." to a png thumbnail to support the browser
or is this corrected in the 1.12.0 code sources then i go to update it already , i tried to find but i am not a php programmer sorry.
or what are i doing wrong ? what can i check ?
thanks kris
Op Thu, 13 Dec 2007 18:07:50 +0100 Kris Coryn (Mailinglists) k.coryn.ml@telenet.be Schreef:
Thanks boris for doing the test.
this is what i excepted from trying to debug and reading the sources, i have almost the same versions like boris, it is not a misconfiguration but the support for tif is changed from version 1.10.0 i checked the svn code for the 1.12.0 and that part isn't changed for the image/tiff code support.
someone of the developers team ? that can help me, why probably there is no more support for tiff images for the moment?
Kris
Op Wed, 12 Dec 2007 21:01:59 -0500 Boris Steipe boris.steipe@utoronto.ca Schreef:
Kris -
No joy with that. Running MediaWiki: 1.11.0 PHP: 5.2.4 (apache2handler) and MySQL: 5.0.45; ImageMagick 6.3.6 10/20/07 Q16 :
No thumbnail, no image, but file uploads oK since the clickable link displays the image in my browser without problem.
Tried the following: Converted to uncompressed tiff - No Converted to gif - Yes Converted to png - Yes Converted to jpeg - yes
On my installation, the two tif files were not supported, the same file as gif, png or jpeg was.
HTH, Boris
On 12-Dec-07, at 5:12 PM, Kris Coryn (Mailinglists) wrote:
Hallo,
't is possible that several person's who have access to a mediawiki 1.11.0 server do the simple test with a tiff file uploaded
check the $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg','tif' ); for allow tif files to upload
download this little tif file http://users.pandora.be/kris.coryn/ YinYang_symbool_bw.tif
and do the upload test , if you see the little thumbnail on a page than 't is ok for the mediawiki 1.11.0 software do the convertion from a tif image if you have a blank box (like me) than is it possible that 1.11.0 with the standard configuration doesn't convert a tiff image good anymore.
I know tif is not a standard web image file , but i have all my scanned BW photo's in tiff format on my wiki ;-((
thanks for your time to test it.
kris
Op Tue, 11 Dec 2007 22:07:23 +0100 Kris Coryn (Mailinglists) k.coryn.ml@telenet.be Schreef:
Op Mon, 10 Dec 2007 23:05:26 -0800 Hiram Clawson hiram@soe.ucsc.edu Schreef:
You might try adding something like this to your local settings:
$wgMimeDetectorCommand = "/usr/bin/file -bi";
I had trouble similar to this after an upgrade.
that's one of the thinks a have tested also installed php-pecl-Fileinfo http://www.mediawiki.org/wiki/Manual:FAQ#. 22File_is_corrupt_or_has_an_invalid_extension.22
but for me there is no mime type problem because in the $wgDebugLogFile :
MediaHandler::getHandler: no handler found for image/tiff.
he knows it is a image/tiff but doesn't know how to handler this format
for example a png file that have already thumbnails of the good size output this in the $wgDebugLogFile :
File::transform: Doing stat for /var_data/www/localhost/htdocs/taijiquan.homelinux.net/wiki/ images/thumb/5/56/Yin_yang.svg.png/120px-Yin_yang.svg.png BitmapHandler::doTransform: creating 120x120 thumbnail at /var_data/www/localhost/htdocs/taijiquan.homelinux.net/wiki/ images/thumb/5/56/Yin_yang.svg.png/120px- Yin_yang.svg.png
if i remove the 120px image then the ImageMagick convertor do his job like this
File::transform: Doing stat for /var_data/www/localhost/htdocs/taijiquan.homelinux.net/wiki/ images/thumb/5/56/Yin_yang.svg.png/120px-Yin_yang.svg.png BitmapHandler::doTransform: creating 120x120 thumbnail at /var_data/www/localhost/htdocs/taijiquan.homelinux.net/wiki/ images/thumb/5/56/Yin_yang.svg.png/120px- Yin_yang.svg.png BitmapHandler::doTransform: running ImageMagick: '/usr/bin/convert' -quality 95 -background white -size 120 '/var_data/www/localhost/htdocs/taijiquan.homelinux .net/wiki/ images/5/56/Yin_yang.svg.png' -coalesce -thumbnail '120x120!' -depth 8 '/var_data/www/localhost/htdocs/taijiquan.homelinux.net/wiki/ images/thumb/5/ 56/Yin_yang.svg.png/120px-Yin_yang.svg.png' 2>&1 wfShellExec: '/var_data/www/localhost/htdocs/taijiquan.homelinux.net/wiki/bin/ ulimit4.sh' 30 102400 102400 ''''/usr/bin/convert''' -quality 95 -background wh ite -size 120 '''/var_data/www/localhost/htdocs/taijiquan.homelinux.net/wiki/ images/5/56/Yin_yang.svg.png''' -coalesce -thumbnail '''120x120!''' -depth 8 '''/var_data/www/localhost/htdocs/taijiquan.homelinux.net/wiki/ images/thumb/5/56/Yin_yang.svg.png/120px-Yin_yang.svg.png''' 2>&1'
but no actions are taken to convert a image/tiff just one line :
MediaHandler::getHandler: no handler found for image/tiff.
this is defined in the DefaultSettings.php
$wgMediaHandlers = array( 'image/jpeg' => 'BitmapHandler', 'image/png' => 'BitmapHandler', 'image/gif' => 'BitmapHandler', 'image/x-ms-bmp' => 'BmpHandler', 'image/svg+xml' => 'SvgHandler', // official 'image/svg' => 'SvgHandler', // compat 'image/vnd.djvu' => 'DjVuHandler', // official 'image/x.djvu' => 'DjVuHandler', // compat 'image/x-djvu' => 'DjVuHandler', // compat );
but i don't know and find no doc's or faq what the Handler is for a image/tiff ? so i can add this to the Localsettings.php this is changed in version 1.10.0 maybe better in the upcoming next version 1.12.0 ?
Kris
--Hiram
Kris Coryn (Mailinglists) wrote:
Hallo,
i have upgraded my webserver to Mediawiki 1.11.0 , almost perfect but i can't see my tiff documents. jpeg or png is no problem so LocalSettings.php is good configured for using ImageMagick to created thumbnails pictures
after checking FAQ and debug with $wgDebugLogFile i found this error for all the tiff images
MediaHandler::getHandler: no handler found for image/tiff.
i traced this back to wgMediaHandlers where no tiff images are present
http://www.mediawiki.org/wiki/Manual:%24wgMediaHandlers say's
$wgMediaHandlers = array( 'image/jpeg' => 'BitmapHandler', 'image/png' => 'BitmapHandler', 'image/gif' => 'BitmapHandler', 'image/x-ms-bmp' => 'BmpHandler', 'image/svg+xml' => 'SvgHandler', // official 'image/svg' => 'SvgHandler', // compat 'image/vnd.djvu' => 'DjVuHandler', // official 'image/x.djvu' => 'DjVuHandler', // compat 'image/x-djvu' => 'DjVuHandler', // compat );
this wil results in the script wiki/includes/media/Generic.php for the clas MediaHandler to say "no handler found for $type."
how to configure the wiki for using tiff files again? the previous version was mediawiki 1.8.2 that has no problems with tiff images. wgMediaHandlers is introduced in version 1.10.0
thanks
Kris
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Kris Coryn (Mailinglists) wrote:
Hallo wikitech-l group,
can someone here look what is going on with the tif supported code, it doesn't convert anymore in 1.11.0 "MediaHandler::getHandler: no handler found for image/tiff." to a png thumbnail to support the browser
or is this corrected in the 1.12.0 code sources then i go to update it already , i tried to find but i am not a php programmer sorry.
or what are i doing wrong ? what can i check ?
There's never been any TIFF support in the MediaWiki core. Maybe there's an extension for it, try searching Google.
-- Tim Starling
On my old server with following version of software
* MediaWiki: 1.8.2 * PHP: 5.2.2-pl1-gentoo (apache2handler) * MySQL: 5.0.44-log
I just added to $wgFileExtensions the tif extentions i have upladed a 100 tif files no problem
this a $wgDebugLogFile on the MediaWiki 1.8.2
wfShellExec: '/var_data/www/localhost/htdocs/taijiquan.homelinux.net/wiki/bin/ulimit-tvf.sh' 30 102400 102400 '/usr/bin/convert' -background white -size 120 '/var_data/www/localhost/htdocs/taijiquan.homelinux.net/wiki/images/d/d3/YinYang_symbool.tif' -coalesce -thumbnail '120x78!' -depth 8 ' /var_data/www/localhost/htdocs/taijiquan.homelinux.net/wiki/images/thumb/d/d3/YinYang_symbool.tif/120px-YinYang_symbool.tif.png' 2>&1 reallyRenderThumb: running ImageMagick: '/usr/bin/convert' -background white -size 120 '/var_data/www/localhost/htdocs/taijiquan.homelinux.net/wik i/images/4/40/YinYang_symbool_bw.tif' -coalesce -thumbnail '120x78!' -depth 8 '/var_data/www/localhost/htdocs/taijiquan.homelinux.net/wiki/images/ thumb/4/40/YinYang_symbool_bw.tif/120px-YinYang_symbool_bw.tif.png' 2>&1
so the YinYang_symbool.tif is converted to a thumnail 120px-YinYang_symbool_bw.tif.png
this a $wgDebugLogFile on the MediaWiki 1.11.0
MediaHandler::getHandler: no handler found for image/tiff.
if i add to LocalSettings.php the image/tiff line to use the Bitmap Handler
$wgMediaHandlers = array( 'image/jpeg' => 'BitmapHandler', 'image/png' => 'BitmapHandler', 'image/gif' => 'BitmapHandler', 'image/x-ms-bmp' => 'BmpHandler', 'image/svg+xml' => 'SvgHandler', 'image/svg' => 'SvgHandler', 'image/vnd.djvu' => 'DjVuHandler', 'image/tiff' => 'BitmapHandler', );
then is there a convertion
File::transform: Doing stat for /var_data/www/localhost/htdocs/taijiquan.homelinux.net/wiki/images/thumb/4/40/YinYang_symbool_bw.tif/300px-YinYang_symbool_bw.tif BitmapHandler::doTransform: creating 300x196 thumbnail at /var_data/www/localhost/htdocs/taijiquan.homelinux.net/wiki/images/thumb/4/40/YinYang_symbool_bw.tif/300px-YinYang_symbool_bw.tif BitmapHandler::doTransform: running ImageMagick: '/usr/bin/convert' -background white -size 300 '/var_data/www/localhost/htdocs/taijiquan.homelinux.net/wiki/images/4/40/YinYang_symbool_bw.tif' -coalesce -thumbnail '300x196!' -depth 8 '/var_data/www/localhost/htdocs/taijiquan.homelinux.net/wiki/images/thumb/4/40/YinYang_symbool_bw.tif/300px-YinYang_symbool_bw.tif' 2>&1 wfShellExec: '/var_data/www/localhost/htdocs/taijiquan.homelinux.net/wiki/bin/ulimit4.sh' 30 102400 102400 ''''/usr/bin/convert''' -background white -size 300 '''/var_data/www/localhost/htdocs/taijiquan.homelinux.net/wiki/images/4/40/YinYang_symbool_bw.tif''' -coalesce -thumbnail '''300x196!''' -depth 8 '''/var_data/www/localhost/htdocs/taijiquan.homelinux.net/wiki/images/thumb/4/40/YinYang_symbool_bw.tif/300px-YinYang_symbool_bw.tif''' 2>&1'
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
like include/File.php lines 258 (Mediawiki 1.11.0) says :
* Currently, this checks if the file is an image format * that can be converted to a format * supported by all browsers (namely GIF, PNG and JPEG), * or if it is an SVG image and SVG conversion is enabled.
so i think one of the functions that check to convert has to add .png to support the browsers in case it is a image/tiff to var $dstPath and $dstUrl or to $thumbPath and $thumbUrl or just $Thumbnail in the FIle.php
but i 'm not so good in pointer variable and how to follow to the right function to change?
that is what is see and it was in 1.8.2 working correctly without adding a extention i just have two Extentions used in both versions EasyTimeline.php and Graphviz.php
Op Sun, 16 Dec 2007 15:28:29 +1100 Tim Starling tstarling@wikimedia.org Schreef:
Kris Coryn (Mailinglists) wrote:
Hallo wikitech-l group,
can someone here look what is going on with the tif supported code, it doesn't convert anymore in 1.11.0 "MediaHandler::getHandler: no handler found for image/tiff." to a png thumbnail to support the browser
or is this corrected in the 1.12.0 code sources then i go to update it already , i tried to find but i am not a php programmer sorry.
or what are i doing wrong ? what can i check ?
There's never been any TIFF support in the MediaWiki core. Maybe there's an extension for it, try searching Google.
-- Tim Starling
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l
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' ); } }
$wgMediaHandlers['image/tiff'] = 'TiffHandler';
Op Mon, 17 Dec 2007 05:34:34 +1100 Tim Starling tstarling@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@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org