User:Y98/Work in progress/Commons:Overgang naar SVG

From Wikimedia Commons, the free media repository
Jump to: navigation, search
This user page in other languages:
العربية|Alemannisch | català | Deutsch | English | español | français | galego | 日本語 | 한국어 | português | русский | Bahasa Melayu | +/−
Notice Please note that the deletion of superseded images has been suspended indefinitely; see Commons:Superseded images policy for more information.

De MediaWiki software die gebruikt wordt op onze Wikimedia project wiki's is uitgebreid om om te kunnen gaan met SVG-afbeeldingen (Scalable Vector Graphics).

SVG heeft deze voordelen
  • Het is niet een op pixels gebaseerd afbeeldingsbestandsformaat en is dus schaalbaar in elke grootte zonder verlies van scherpte. (Aangezien het resolutie-onafhankelijk is is de bestandsgrootte hetzelfde.)
  • Op vectoren gebaseerde afbeeldingen hebben vaak een veel lagere bestandsgrootte, omdat de bestandsgrootte niet toeneemt met de resolutie maar met werkelijke inhoud en detail.
  • SVG is veel geschikter voor wiki-bewerkingen omdat, in tegenstelling to rasterafbeeldingen, het bewerken van SVG's vrij eenvoudig is. (U kunt eenvoudig dingen, objecten en vormen veranderen. De stijl (kleuren, randen, kleurovergangen) en bestaande elementen (contouren, tekst, …)).
  • Omdat Wikimedia-projecten bedoeld zijn als vrije inhoud zijn SVG's belangerijk; een lastig te bewerken rasterafbeelding is niet vrij. (U kunt probleemloos inhoud uit een SVG-bestand overnemen en in andere bestanden hergebruiken.)
SVG heeft deze nadelen
  • Fouten met SVG-afbeeldingen van slechte technische kwaliteit hebben af en toe ook gezorgd voor ernstiger problemen. Daarom zijn er tijdslimieten ingesteld voor het voor weergave omzetten van SVG's.
  • De servers kunnen niet alle functies in SVG omzetten voor weergave, daarom zijn de gegenereerde PNG-bestanden soms anders dan de maker ze bedoeld heeft.

Zelfs met de nadelen van SVG is het goed om het gebruik van afbeeldingsbestandsformaten zonder gegevensverlies aan te moedigen. Daarom is het het waard om SVG-gebaseerde alternatieven aan te bieden en mensen aan te moedigen om ze te gebruiken. Om mensen te verzoeken een rasterafbeelding om te zetten naar SVG, kunt u het label {{convert to SVG}} toevoegen aan de omschrijvingspagina.

Flags[edit]

As flags are used heavily in all Wikimedia projects they need at first to be replaced with the SVG-version there. So basically you have to do the following steps:

  1. Check that the policy on the project you want to change wants this change. If it does not, you must not make the change at that project. The project policies rule when there is a conflict with preferences here. If there is no policy or you don't find it, ask first! Wikinews is one project which does not want this, in part because it needs a complete and accurate historical record of exactly what its old stories contained!
  2. Go to Category:Flags take your nation/country/city/whatever flag that is interesting to you and look if there is already a replacement SVG-version of it in Wikimedia Commons.
  3. If not, go to www.openclipart.org or create an own SVG-version of the flag (e.g. with Inkscape) and upload it to Wikimedia Commons.
  4. Mark the description page of the pixel-flag-version with a hint that there exists an SVG version, using the {{vector version available}} template. This suggests that people use the SVG version if practical.
  5. Give people and projects time to replace the image if they want — many months because it takes time to discover and decide.
  6. Go to Special:GlobalUsage and look up the current usage of the pixel-version-flag. Change the image links in articles to the SVG version, starting with those on your own project. Remember to ask for help from others on your project, as conversion is a lot of work.

Bots[edit]

The many bots that run on the wikis are very capable of this task and bot operators tend to be very eagerly willing to help and show off their monsters where they can. Make sure that you leave a message in the Village Pump of each project requesting bot help if it is available. Also, many, if not all, of the bot operators habitually read this mailing list and your request may be especially effective there. It takes a bot, depending on many different factors, from a few hours to perhaps a day to run through the whole Wikipedia replacing images; it takes a human eons and they're in a bad mood when they finish.

Please remember that a bot needs specific permission from every project in which it operates and that permission must be given for each different task the bot does. There is no permission which applies for all projects and all uses of a bot. Operating a bot on all projects is likely to get the bot and/or its operator blocked on all projects as an emergency measure if it breaks policies on the wikis where it is being used!

Notes[edit]

There have been complaints about PNG images being replaced by inferior quality SVG images, or, even, by factually incorrect ones. Especially the latter is not acceptable by an encyclopaedia project. Make absolutely sure that the quality of the replacement is the same or superior to the original, before marking it as redundant.

PNGs should not just be replaced en masse the instant an SVG replacement becomes available. It is often sufficient to label the image description page with a {{vector version available}} tag, and it will be migrated over to the SVG version by editors where appropriate.

It's highly recommended to use a valid SVG format. This will ensure that your image will remain usable over time and will make edits possible in other SVG editors. Files saved using Inkscape or Adobe Illustrator format sometimes contain non-standard elements which will generate rendering errors or trigger bugs on Wikimedia's render engine. To validate your files you can use the W3C MarkUp Validator, or, to check for common problems, which may prevent correct display in "rsvg", you may use the Commons:SVG Check.

Please be sure to use free (libre) and valid fonts in <text> (list of wikimedia supported svg fonts) elements to prevent render errors. This will help maintain the uniformity of style and the ability to edit your images in non-proprietary software and systems (not everybody can use proprietary fonts).

Limitations[edit]

MediaWiki SVG support has serious limitations when it comes to rendering:

  • The marker tag (<marker>) isn't supported correctly so that e.g. arrows aren't displayed. (This can be worked around by converting the relevant arrow to a path. To do this in Inkscape, select the path containing the arrow, then choose Stroke to Path from the Path menu.) Sometimes the defined marker element appears visible, by the property "overflow: visible".[1] It should be noted that the indication of the marker element is not in quotes.[2]
  • Text flow (<flow...>) is not supported – use <text> instead. In general, problems with text rendering can be fixed by converting the text to a path, but this has the following disadvantages:
    • The file size increases dramatically.
    • The text is not searchable as text any more.
    • Editing the text becomes harder, so changes like spelling corrections or translations require the text to be recreated from scratch.
  • The Gaussian blur filter is buggy (blurred objects do not show up at small sizes, and are misplaced at some larger sizes)

When uploading SVG images an additional PNG version might be appropriate.

These and other bugs should be reported at the librsvg (GNOME) bugzilla, and example images get a tag Category:Pictures showing a librsvg bug.

Further information: Librsvg development funding on WikiMedia and also (for historical information ) SVG image support on MetaWiki

See also[edit]