Image talk:Imbox style.png

From Wikipedia, the free encyclopedia

[edit] Add ShouldBeSVG template please

{{editprotected}} Please add a ShouldBeSVG template to the image page. It Is Me Here (talk) 16:48, 30 May 2008 (UTC)

Y Done PeterSymonds (talk) 17:22, 30 May 2008 (UTC)
No, this should not be an SVG. First of all it already is available as an SVG, as the image page says: "Derived from Image:Broom icon.svg". Secondly this version of the image was created specially for use in {{imbox}}. There are several reason we use PNGs in high-use templates like the {{imbox}} and {{ambox}}:
  • Since this image is used in the high-use / high-risk template {{imbox}} we have to upload a local copy of the image to Wikipedia so we can protect it, instead of using the image from Commons. In this specific case that was not that necessary since this image is already protected on Commons. (It needs to be protected to prevent vandals from adding a rude image to LOTS of pages with a single edit.)
  • MediaWiki SVG rescaling isn't as good as doing it in some graphics editing softwares. (Although lately the MediaWiki rescaling has been improved and now is almost as good.)
  • MediaWiki uses a white background for the transparent part of the PNG images it renders from the SVGs. That means that in older browsers who do not understand transparent PNGs these images look bad when used in the imbox who has a slightly grey background. They become white boxes. Thus in these specially made PNGs we have a background with the same colour as the imbox background, making them look good in all browsers.
This kind of optimisations are worth the effort for high-use templates like the {{imbox}}. This has been extensively discussed and agreed on over at Wikipedia talk:Article message boxes .
--David Göthberg (talk) 11:21, 31 May 2008 (UTC)
I am afraid I am still somewhat confused as to why a PNG is preferable:
  • Why does making the image an SVG affect its protected status / security?
  • Image:Broom icon.svg looks fine to me, so where would the problem lie in using it for something like {{imbox}}?
  • Why not just use an SVG which also uses a white background if transparency is not preferable?
It Is Me Here (talk) 10:49, 1 June 2008 (UTC)
Right, we can protect an SVG too. But what I meant is that when we anyway need to have a local copy so we can protect it, then we can just as well take the chance to optimise it before we store it here.
Right, in this case MediaWiki scales Image:Broom icon.svg fine down to 40px without any visible errors. But until recently MediaWiki did not scale it as well, and it still does not scale some of the other imbox images well.
But you are misunderstanding the most important part: Transparency is preferable and the Image:Imbox style.png indeed is transparent. (As you can see from the chequered background the image has on the image page.) But "behind" the transparent parts of the image is a background colour that you don't see. When MediaWiki scales and renders SVG images it makes them into PNGs that are sent to the users web browsers. MediaWiki always sets the "invisible" background to white. Problem is that the imboxes are not white, they are light grey. And some older web browsers do not understand transparency and shows the "invisible" background in the PNGs that MediaWiki renders from the SVGs. Thus our imbox icons become white boxes if they are SVGs when seen in those older web browsers, and that looks bad. But in our hand optimised PNGs we have set the "invisible" background to the proper imbox light-grey background, so they look fine in the older browsers. The MediaWiki SVG->PNG "invisible" white backgrounds would of course be even worse in the {{tmbox}} which has brown background.
--David Göthberg (talk) 15:03, 1 June 2008 (UTC)