Page MenuHomePhabricator

Can't create thumbnail of images with a peculiar aspect ratio
Closed, ResolvedPublic

Description

Author: broken.arrow

Description:
Thumbnailing very tall and narrow images, whose width is only a few pixels (like the one above, 2 × 295 pixels) does not work in galleries. According to Brion, the code may be trying to scale to less than 1 pixel wide. Example:
http://commons.wikimedia.org/w/index.php?title=Special:NewImages&until=20080324144749


Version: 1.13.x
Severity: minor
URL: http://commons.wikimedia.org/wiki/Image:VBAR.png

Details

Reference
bz13493

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:03 PM
bzimport set Reference to bz13493.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Mar 24 2008, 6:31 PM
brion added a comment.Mar 24 2008, 8:49 PM

The base problem is that MediaWiki tracks thumbnails by width, and here we're requesting a size that's not going to fit in the 120x120 box... The 1px-wide image will be ~148 pixels tall, so it has to back down a pixel to 0px... which is invalid.

(Note that the equivalent horizontal bar renders to a 120x120 box just fine, since we can request the exact desired width.)

Probably what we want to do here is take the 1px version, then if necessary scale it client-side to fit vertically.

Bryan.TongMinh wrote:

Client side scaling for <1px images in either direction looks like the best solution to me.

Bryan.TongMinh wrote:

This was fixed somewhere along the way.

Gilles moved this task from Untriaged to Done on the Multimedia board.
Restricted Application added a project: Commons. · View Herald TranscriptFeb 22 2019, 6:53 PM