Last modified: 2010-05-15 15:38:49 UTC
After having a problem with the thumbnails on my wiki, I tracked what seems to be a bug in Image::reallyRenderThumb(). Thanks Brion for the help!. The offending piece of code is about line 1018: # Use PHP's builtin GD library functions. # # First find out what kind of file this is, and select the correct # input routine for this. $truecolor = false; switch( $this->type ) { case 1: # GIF $src_image = imagecreatefromgif( $this->imagePath ); break; ... The problem is that $this->type contained the string "BITMAP", and is being compared to integers. The image type is not recognized and the thumbnail generation fails.
Which PHP and GD versions do you use? The manual page http://de2.php.net/manual/en/function.getimagesize.php says that the type is an integer, it doesn't mention that there are any versions returning strings.
You got it wrong. Image::type is holding a value returned by MimeMagic class.
Working on this.
Fixed in CVS HEAD. Now uses the mime types to choose which way to load the image.
*** Bug 2720 has been marked as a duplicate of this bug. ***