Page MenuHomePhabricator

<gallery> shouldn't rescale small bitmap images
Open, LowPublic

Description

Author: skizzerz

Description:
currently when a <gallery> tag is used on a small image, it blows it up beyond a recognizable point (see URL). I've browsed through the code, but I can't figure out what's causing it. Ideally, the resizing in the gallery should only apply to images that are LARGER than 120x120, not all images. Smaller images should stay small and just be centered horizontally and vertically within the frame.


Version: 1.20.x
Severity: normal
URL: http://www.mediawiki.org/wiki/User:Skizzerz/Gallerytest

Details

Reference
bz13214

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:05 PM
bzimport set Reference to bz13214.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Mar 1 2008, 7:54 PM
brion added a comment.Mar 2 2008, 9:56 PM

I've lost track of whether we're allegedly scaling up on purpose or not scaling up on purpose.

cf bug 3499, from back when we didn't scale them up.

Huji added a comment.Mar 2 2008, 10:37 PM

With r31473, I applied what is requested here. As the opposite (bug 3499) was turned down as WONTFIX, I thought this one should be FIXED.

Huji added a comment.Mar 3 2008, 8:00 AM

Reverted by brion on r31477, because of causing fatal errors.

ayg wrote:

*** Bug 3499 has been marked as a duplicate of this bug. ***

Huji added a comment.Mar 8 2008, 7:00 PM

Brion, I can't reproduce the issue you mentioned when reverting r31473. Can you please provide more details?

brion added a comment.Mar 10 2008, 7:13 PM

Run the parser tests:

Running test Gallery... Fatal error: Call to a member function getWidth() on a non-object in /Library/WebServer/Documents/trunk/includes/ImageGallery.php on line 249

  • Bug 21367 has been marked as a duplicate of this bug. ***

(In reply to comment #1)

I've lost track of whether we're allegedly scaling up on purpose or not scaling
up on purpose.
cf bug 3499, from back when we didn't scale them up.

If I understand correctly:

  • bug 3499 was a request to scale up small SVGs, because they're resizable without pixelation.
  • bug 13214 is a request *not* to scale up small bitmap images, because of the induced pixelation.

Changing summary accordingly.

mr.heat wrote:

Is anybody working on this? I tried this at Commons today. Currently, all small images are scaled up in a <gallery>.

As said before, for small SVG images this perfectly makes sense since (almost) all SVG images can be scaled up without pixelation.

For small bitmap images (PNG, JPG and so on) this does not make sense. It looks horribly blurry in all current web browsers since all web browsers added bicubic interpolation to their current versions.

Here is an example where (from my point of view) it's obvious this behavior is wrong:

<gallery>
File:Icon External Link.svg|SVG
File:Icon External Link.png|PNG
</gallery>

Small thumbs are still upscaled.

http://www.mediawiki.org/w/index.php?title=Special:ListFiles&sort=img_size&limit=50

Very disappointing cos it seems so easy to fix.

[For the dumb search: Dont' enlarge upscale resize small smaller thumbs thumbnails images gallery]

  • Bug 3510 has been marked as a duplicate of this bug. ***
Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 6:08 PM
Restricted Application added subscribers: Steinsplitter, Matanya, Aklapper. · View Herald TranscriptSep 4 2015, 6:08 PM
gpaumier removed a subscriber: gpaumier.Jul 18 2018, 6:02 PM
Restricted Application added a project: Commons. · View Herald TranscriptJul 18 2018, 6:02 PM