Page MenuHomePhabricator

Some Thumbnails are not created
Closed, ResolvedPublic

Description

Author: bugzilla

Description:
For this Image
http://de.pluspedia.org/wiki/Datei:Steintest.jpg

the thumbnail is not created. Media-Wiki tells the thumbnail parameters are invalid.

The error also occurs on 1.19.2 and 1.20.

Thumbnails are created in general but a few of them are not.


Version: 1.20.x
Severity: normal

Details

Reference
bz42342

Related Objects

StatusAssignedTask
OpenNone
ResolvedNone

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:51 AM
bzimport set Reference to bz42342.
bzimport added a subscriber: Unknown Object (MLST).

The pixel size of the file is 3.264 × 4.928.
Does the same problem happen for files with a similar (or even larger) size?

  • This bug has been marked as a duplicate of bug 32387 ***

bugzilla wrote:

@Andre - Thank you for your answer. It's the right Question :-)

Meanwhile I found the solution.

$wgMaxImageArea = 1.25e7; is too small.

My first Solution:
LocalSettings.php:
$wgMaxImageArea = $wgMaxImageArea * 100

Background File: Bitmap.php:

Til 18.4 (incl.):

		if ( $mimeType !== 'image/jpeg' &&
			$srcWidth * $srcHeight > $wgMaxImageArea )
		{
			return false;
		}

Since 19.0:

			if ( $srcWidth * $srcHeight > $wgMaxImageArea &&
					!( $image->getMimeType() == 'image/jpeg' &&
						self::getScalerType( false, false ) == 'im' ) ) {
				# Only ImageMagick can efficiently downsize jpg images without loading
				# the entire file in memory
				return false;
                  }
Gilles triaged this task as Unbreak Now! priority.Dec 4 2014, 10:10 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Needs Triage.Dec 4 2014, 11:21 AM