Last modified: 2010-05-15 15:38:49 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T4780, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 2780 - Thumbnails not working with GD
Thumbnails not working with GD
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.5.x
PC Linux
: Normal normal (vote)
: ---
Assigned To: Brion Vibber
:
: 2720 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-10 06:42 UTC by Juliano F. Ravasi
Modified: 2010-05-15 15:38 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Juliano F. Ravasi 2005-07-10 06:42:14 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.
Comment 1 JeLuF 2005-07-11 00:08:28 UTC
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.
Comment 2 Juliano F. Ravasi 2005-07-11 00:41:02 UTC
You got it wrong. Image::type is holding a value returned by MimeMagic class.
Comment 3 Brion Vibber 2005-07-11 01:19:23 UTC
Working on this.
Comment 4 Brion Vibber 2005-07-11 01:54:20 UTC
Fixed in CVS HEAD.

Now uses the mime types to choose which way to load the image.
Comment 5 Zigger 2005-07-14 03:33:11 UTC
*** Bug 2720 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links