Last modified: 2012-10-25 17:39:37 UTC
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
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.
Client side scaling for <1px images in either direction looks like the best solution to me.
This was fixed somewhere along the way.