Last modified: 2014-09-04 19:06:18 UTC
MultimediaViewer of an SVG with a small nominal size looks a bit ridiculous, e.g. https://www.mediawiki.org/wiki/User:Zven#mediaviewer/File:Nuvola-inspired-terminal.svg There's a similar complaint at <https://en.wikipedia.org/w/index.php?title=Wikipedia_talk:Media_Viewer&oldid=619257982#How_is_a_user_supposed_to_zoom_an_image.3F> The question I have is whether the nominal size should be used at all. Perhaps SVGs should be displayed as if they were infinitely large raster images, i.e. scaling to some large default size.
Nominal size is indeed a bit funky on a lot of icons. It'd be ideal if we don't have to special-case this for SVG, but I suspect that's the easiest route -- just use the aspect ratio and be aware of the maximum rendering size.
We have MediaHandler::isVectorized(), which returns true for SVGs only. It is a property of vector images that dimensions given in pixels are arbitrary and ignorable.
This would be trivial to fix (we had to add special handling just to ensure the nominal size is taken into account), but would that really be better? Icons look strange in general, it's the exact same with a PNG icon. (There were suggestions to not load MediaViewer at all for very small images, although that would result in inconsistent behavior.)
With a PNG icon, it will look pixellated when enlarged, which may well be better than having a small image on an enormous field of black. I would have thought an enlarged icon would be relatively uncontroversial -- I only chose it as a more extreme illustration of the point about SVG scaling raised on [[Wikipedia talk:Media Viewer]] by Gwideman. In that case it was a detailed graph in SVG form, with a nominal size of 270x270. If you want to know roughly what voltage a J-type thermocouple will give at 300K, you are much better off at a screen-filling width of say 480px: <https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/Intermediate_temperature_thermocouples_reference_functions.svg/480px-Intermediate_temperature_thermocouples_reference_functions.svg.png>