Page MenuHomePhabricator

Scale up thumbnails of small SVG
Closed, ResolvedPublic

Description

Author: xeddvok7bd7464n2

Description:
Small SVG file with a nominal size less than 180 px will not be enlarged when using them as thumb images. Their size remains small although this are scalable files and you can download rendered PNG images with bigger sizes (see http://commons.wikimedia.org/wiki/File:CH-Hinweissignal-Ausfahrtstafel_(3).svg).


Version: unspecified
Severity: normal

Details

Reference
bz19633

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:37 PM
bzimport set Reference to bz19633.

Assigning SVG bugs to Ariel -- need a cleanup pass to see what's fixed up by a librsvg upgrade, what can be resolved with fixes to our font configuration, what can be fixed on our end, and what still needs to be pushed upstream.

We scale up thumbnails of small SVGs in <gallery>s, so it makes sense to scale them up when used with |thumb as well.

Linker.php makeImageLink2()

When no explicit width is set, width is initiated as the full image size (which is the nominal image size for an SVG). Then in case of thumbnails, the thumbsize is retrieved from the preferences, but that thumbsize is ONLY used, if ( $prefWidth < $hp['width'] ). Because in the case of small nominal SVG sizes, prefwidth will always be larger, the default thumbnail size is never used.

The same is true for small bitmap images such as File:External_link_icon.png

Created attachment 7384
Possible new check

We could choose to always 'upscale' material that is vector based.....

The patch shows such a check, but requires implementation of isVectorized().

Attached:

hmm, this is totally the wrong patch btw. It seems that I have lost that one. :(