Template talk:FakeSVG

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

It's a little too much[edit]

An SVG file with text element labels that belongs to Category:SVG images with embedded raster graphics:Maps. Category states cleanup is not needed, but the File: page states, "Such images are liable to produce inferior results when scaled to different sizes (as well as possibly being very inefficient in file size)."
A PNG file that should be an SVG with embedded raster graphics. It could also be an SVG file with no raster graphics.
A JPEG file that should be an SVG with embedded image. This file exists in many languages. File is tagged with {{Convert to SVG}}
An SVG file with embedded bitmap and SVG text elements that belongs to Category:SVG images with required raster graphics. Traditional path of upgrading a JPEG to labeled SVG.

I am not against the existence of the template because this bugs me too but it seems a little too... Aggressive? Both the visuals and the wording. The only template I can think of that is as "scary" as this one is Copyvio. 😵--TFerenczy (talk) 10:14, 4 October 2019 (UTC)[reply]

Yes. It was mentioned in this discussion. --Watchduck (quack) 11:10, 19 May 2021 (UTC)[reply]
@TFerenczy: FakeSVG differently to Template:BadSVG imho not desired on Commons. So they should not only not get uploaded, they should imho actively get banned.
However I agree with @Watchduck: that Template:BadSVG is too dominant at File:Main_symptoms_of_copper_poisoning.svg  — Johannes Kalliauer - Talk | Contributions 22:03, 24 May 2021 (UTC)[reply]
I agree with JoKalliauer, I don't think {{FakeSVG}}, when properly used, is too aggressive. Why upload a fake SVG if you can easily make and upload a PNG? I see sometimes {{BadSVG}} is misused, File:Main symptoms of copper poisoning.svg mentioned by JoKalliauer is an example. I've just removed {{BadSVG}} on these image pages. See: File talk:Main symptoms of copper poisoning.svg#Not BadSVG. --Tomchen1989 (talk) 12:17, 13 July 2021 (UTC)[reply]
I am aware that the template inclusions that have been done reflect a significant amount of work. The categorization has also improved substantially from its first efforts. Thank you.
I'm sympathetic to the goals of both {{FakeSVG}} and {{BadSVG}}, but I have problems with how both templates are used.
The names of both templates are semantically loaded and misleading. FakeSVG files are not fake SVG files; there is nothing fake about these syntactically and semantically correct files. Similarly, BadSVG files have correct syntax and semantics. Many users get a knee jerk reflex when they see those templates added to their SVG contribution.
Consequently, I would prefer template names that are more accurate, have neutral tone, and are less likely to offend contributors. A neutral template name might be SVG with embedded image. Such a name does not have the connotation of "fake" or "bad".
The template's text should also contain neutral statements such as, "This SVG file contains embedded raster graphics." The current template also suggests a strident taxonomy. If an SVG file contains just a bitmap, then it is a FakeSVG; if it contains a bitmap and other SVG elements, then it is a BadSVG. The distinctions are more varied and subtle, as are shown in some transcluded images.
I agree that a JPEG image of the Mona Lisa should not be uploaded as an SVG file. Similarly a PNG image of a Data Matrix or QR code should not be uploaded as an SVG file. An image that is fundamentally a photograph or that is fundamentally a bitmap should not use SVG at all. Other formats are better. In that case, extracting the underlying image and uploading it in a better format makes sense. That said, in most cases I would not delete the original (bad/fake) SVG. Commons is supposed to be available to everybody — not just the WMF wikis. Somebody may have copied a file from Commons, included it in their own work, and then linked to the file name on Commons. We can keep track of links on WMF servers, but we cannot keep track of the links in other places. If we delete a file on Commons that's been around for some time, then we risk breaking some links in external media. I'm reluctant to delete any file on Commons. I see this particular SVG case as the less common one; in most cases, it would make sense to add some vector elements to an embedded bitmap file.
Extract, rename, and delete should not be done in most cases of SVG files with embedded raster graphics. To me, File:Main_symptoms_of_copper_poisoning.svg and their ilk are less than ideal SVG, but they can be more reasonable SVG files with a little work. The solution is not to extract the image, upload to a new name, and delete the original SVG. If that were done, then we would have a JPEG or PNG file that would immediately get tagged with {{Convert to SVG}}, which would eventually lead to a new SVG with the old name. I'd leave such files where they lie. To me, most (fake/bad) SVG files can be improved in place. Yes, a file may currently contain a single bitmap image, but it may have obvious vector elements. Bitmap text could be replaced with vector text. I consider the issue the same as {{Path text SVG}}: we want to keep the SVG file, but we want the SVG improved by replacing the path text with actual text.
The same can be said for an SVG file that is fundamentally a vector diagrams but comprises a bitmap within an SVG file. Instead of a fake SVG moniker, the file should get a template encouraging the in place conversion of its vector content to SVG vector elements.
I went to {{FakeSVG}} and clicked What links here. I looked at the first 5 files, and they all had text elements.
So instead of extract, rename, and delete, I want to see an improve in place approach. The template text should reflect that goal.
I'm aware that many files on Commons are not heavily used. A file may have a few transclusions or even no transclusions. For little-used files, I do not see any urgency to alter them in any way. Leave them be. A bitmap file with an SVG wrapper will display correctly. For examle, File:Main symptoms of copper poisoning.svg is only transcluded to one WikiData item (what is the default |lang= on WikiData? That's a can of worms I never considered.), a Commons category, and another Commons file. It is not something that demands much effort right now or perhaps ever. That said, both the SVG and a PNG version were uploaded at the same time in 2009. The PNG is transcluded to the cs.Wiki; that wiki would be better served by translcuding the SVG and updating the SVG for SVG Translate.
Glrx (talk) 03:37, 28 November 2021 (UTC)[reply]
Hi @Glrx: , when you "went to {{FakeSVG}} and clicked What links here" you will get a wrong result, because the template is linked much more often - only transclutions of FakeSVG will show where it is really used (currently ~2.4K times).
I agree that the template's text is not very helpful; we can try to make things better, e.g. by showing a link where interested people can get some suggestions. it can look somehow like

This graphic image is not a real SVG, just a fake (wrapper), it is a raster graphic without vector coding.
Such misuse of SVG as Metafile is undesirable! See there what should be done.
Note: This template is only for SVG files containing solely raster graphics. If the SVG file mixes vector and raster graphics {{BadSVG}} is supposed to be used.

The proposed text "See there what should be done" needs to be something like "see hints how you can repair it" or "find suggestions how to make it better" — a native English speaker will be able to express the essentials in a short sentence. The linked page can contain all explanations for users with different abilities how they can satisfy any request; including the plea that the template should be replaced afterwards. An example may be my vectorizations of the simpler images from Fake SVGs by Gameposo.
Very often parameters are not properly set: so are topographic raster embeds marked as SVG with raster elements, instead as TopoSVG. I can try to fix that.
Template:BadSVG is just an abbreviations for Template:SVG with raster elements, and long-time used. -- sarang사랑 11:53, 28 November 2021 (UTC)[reply]
@Sarang: Yes, the what links here was picking up too much. I made some comments about the first 5 entries in the list on my talk page. See diff. Only one of those files was marked as a tranclusion.
I'll comment on the text.

This graphic image is not a real SVG, just a fake (wrapper), it is a raster graphic without vector coding.

The file is a real SVG file. The SVG is being used as a wrapper, but it is a real (not a fake) wrapper. The description is not clear. A more factual statement would be
  • This SVG file consists of a single raster graphics image. The file does not contain any vector graphics elements.
The next line states

Such misuse of SVG as Metafile is undesirable! See there what should be done.

I have some trouble with the bold statement. The term "misuse" is too conclusive. Yes, just wrapping a bitmap within SVG file is not be ideal, and such a wrapping isn't using any of SVG's vector capabilities. Embedding a raster format within an SVG file will expand the file: SVG's base64 encoding will need 33% more bytes than the native format: 3 JPEG bytes is 24 bits; SVG will use 4 bytes to store 24 bits. That's a cost, but not a significant one because storage is cheap. Unwrapping the wrapper can be viewed as useless work. That was a big deal when SVG support was sparse, but that is less true today. It is still an issue; for example, one can insert a JPEG but not an SVG file in Google Docs. So using an SVG wrapper makes the file less usable. The use of an SVG wrapper also creates a false expectation in the mind of the user: one expects the graphics to be sharp. That is a legitimate concern, but many times the embedded bitmap has sufficient resolution for typical display sizes. I also expect to be able to copy and paste the text in an SVG file; an embedded bitmap does not offer that function.
Consequently, I would like a statement that would educate the contributor. Purely photographic images may be more appropriate as a JPEG file rather than an SVG file. If the embedded raster image also contains vector graphics elements such as text, lines, arrows, curves, and boxes, then the SVG file could be improved by using the appropriate SVG graphics elements for those features.
Similar comments would apply to BadSVG files.
Glrx (talk) 16:42, 29 November 2021 (UTC)[reply]