Commons:Graphics village pump
This Graphics village pump aims to be technical support forum for all the local Labs, graphists (graphic artists), and volunteers interested in graphic works, and is a page where graphists and users from all the Labs can talk about graphics, tutorials, graphic software, help to build new Graphic Labs, etc. Also for exchanging opinions, ideas, protocols, and ways of improvement.
See also: Graphics abilities page | Graphic Tool | Project Insignia | Stroke Order Project | Current requests/discussions
To have the opinion of graphists check
Illustration Workshop | Map Workshop | Photography Workshop | Video and Sound Workshop |
Monthly archives | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 | – | – | – | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
2008 | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
2009 | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
2010 | Jan | Feb | – | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
2011 | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | – | Dec |
2012 | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
2013 | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | – | Dec |
2014 | Jan | Feb | Mar | Apr | May | – | Jul | Aug | Sep | Oct | Nov | Dec |
2015 | Jan | – | Mar | Apr | May | Jun | Jul | – | Sep | Oct | Nov | Dec |
2016 | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | – | Nov | Dec |
2017 | – | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
2018 | Jan | Feb | Mar | – | May | Jun | Jul | Aug | Sep | – | Nov | Dec |
2019 | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | – | Nov | Dec |
2020 | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | – | – | – |
2021 | – | – | Mar | Apr | – | Jun | Jul | Aug | Sep | – | – | – |
2022 | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
2023 | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
Topic-specific archives |
Coat of Arms not rendering correctly
- The SVG file is bad.
- The SVG renderer on Commons has changed — it has become more standards compliant.
- The SVG file has many
clipPath
elements such as<clipPath clipPathUnits="userSpaceOnUse" id="clipPath5758"> <g id="g5762" inkscape:label="Layer 1" transform="matrix(0.28222223,0,0,0.28222223,-4.1791951,15.378085)" style="fill:none"> <path sodipodi:nodetypes="ccscssc" inkscape:connector-curvature="0" id="path5760" d="M 79.678451,149.81749 H 646.03583 v 258.58398 c 0,285.48607 -283.17773,397.82031 -283.17773,397.82031 0,0 -196.71555,-78.03561 -262.23435,-269.31836 C 87.532751,498.68407 79.678451,455.94392 79.678451,408.40147 Z" style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> </g> </clipPath>
- The problem is
clipPath
elements may not haveg
elements in their contents. Only simple shapes such asrect
andpath
or ause
that references a simple shape. - Inkscape should know better.
- Glrx (talk) 03:21, 9 July 2024 (UTC)
- Thanks 👍 I've uploaded a new version removing the
clipPath
s and it's now rendering as expected. I also tried to find other files affected by this, but CirrusSearch doesn't seem to allow searching within text files. Do you know if there any bots that might be able to find others like this? (I'm surprised the SVG renderer doesn't keep track of errors, and put broken files into a category.) ‑‑YodinT 08:19, 9 July 2024 (UTC)
- Thanks 👍 I've uploaded a new version removing the
- There are many other files. Many maps have the issue.
- Other files can be found by running a validator on the SVG and looking for a similar error:
- A validator will find SVG syntax errors, but that does not necessarily mean the SVG will display incorrectly.
- It is also easy to find these errors using JavaScript and the SVG DOM. Commons SVG Checker might also look for this problem.
- Glrx (talk) 14:09, 9 July 2024 (UTC)
SVG Grafik wird nicht angezeigt
Hallo zusammen, könnte sich bitte einmal jemand diese SVG ansehen? In mehreren Browsern wird diese nicht dargerstellt. Ein Reset auf die Version vom 13.10.2018 war nicht erfolgreich, obwohl in der Versionsgeschichte das noch erfolgversprechend aussah. Ich danke euch! --An-d (talk) 20:09, 25 July 2024 (UTC)
- 1 April 2019 version uses an undefined namespace (
xlink
). The SVG is broken. I added thexlink
namespace. Glrx (talk) 20:34, 25 July 2024 (UTC)
- Now the file displays sometimes but not others. I'm getting "too many requests" errors, so it may be transient. Glrx (talk) 20:52, 25 July 2024 (UTC)
- FYI: The 20:35 and 20:37 versions do not display for me, either, even after flushing cache and refreshing. (Chrome Version 126.0.6478.183) RCraig09 (talk) 21:19, 25 July 2024 (UTC)
- Yes, now they are consistently not displaying after flushing wiki and local caches. Glrx (talk) 21:35, 25 July 2024 (UTC)
- Agreed. Though I'm not sure what "flushing wiki (cache?)" means... not just my browser cache. RCraig09 (talk) 22:19, 25 July 2024 (UTC)
- Flush wiki cache:
file?action=purge
. Tell the servers to purge their cached PNGs. Force the wiki servers to recreate PNGs. Glrx (talk) 22:35, 25 July 2024 (UTC)
- Flush wiki cache:
- PNGs seem to be working now. For instance,
- Glrx (talk) 22:37, 25 July 2024 (UTC)
Issues with E-road shields (Tabliczka set)
The text of the E-road shields that use the "Tabliczka" format have suddenly become offset to the left: they used to be centred until recently. I wonder what is causing the error, and I also ask who has time to correct the alignment of all 263 shields in the set? (I am currently busy on other parts of Wikipedia) Best, --Minoa (talk) 02:51, 30 July 2024 (UTC)
- @Minoa: Apparently the SVG renderer doesn't position non-uniformly scaled text correctly. I.e. there is a
transform="scale(0.907522,1.101902)"
attribute in the<text>
node and removing it makes the text render in the same location as in Inkscape or in the browser. - I don't remember whether this is a known bug and I don't see an elegant way to fix this. If we simply move the text to the right, it'll be too far to the right once the bug is fixed. If we do remove the transform and adjust the position, the characters will have a less narrow shape. Converting the text to paths would solve the rendering issue, but it's just not elegant. TilmannR (talk) 15:41, 30 July 2024 (UTC)
- The svg code could be greatly shortened to basic rectangle and text elements, avoiding the sodipodi and other declarations and complications that Inkscape introduced. But with 263 member files in this category, avoiding the rendering problem would be a grueling task. I'd be willing to do a prototype/model file for someone with more time and patience, though I'm not sure which font I should use in place of the disfavored fond-family, Arial. You might also seek advice at WP:SVG help] at en.WP. RCraig09 (talk) 16:47, 30 July 2024 (UTC)
- For the record, I tried to reduce the size of the file and successfully validate the SVG code at File:Tabliczka E75.svg and File:Tabliczka E951.svg, but it appears that rsvg is scaling the text towards the left despite the
text-anchor="middle"
instruction. While it may be tempting to suggest modifying the view-box to have (0,0) at the middle, such a workaround is not possible for something like File:Integral image application example.svg. --Minoa (talk) 08:22, 31 July 2024 (UTC)
- For the record, I tried to reduce the size of the file and successfully validate the SVG code at File:Tabliczka E75.svg and File:Tabliczka E951.svg, but it appears that rsvg is scaling the text towards the left despite the
- I believe TilmannR has diagnosed the issue. I believe the mechanism is as follows. RSVG is asked to center the text. It calculates the width of the text without scaling. Say that is 400 pixels. It then takes 1/2 that value to compute the starting point; the starting point is then 200 pixels left of the anchor point. Then it paints the text, but the scaling is applied while painting. If the scale factor is 0.9, then the text will be 360 pixels wide. The text will appear shifted to the left by 20 pixels. (If the scaling is 1.1, then the text would appear shifted to the right.)
- It is a bug in the renderer, so I would ask WMF to fix the renderer rather than tweak the SVG. Fix stuff where it is broken. One check would be whether this bug is present in the most recent version of RSVG.
- If the SVG is worked around, I suspect using an x scale factor of 1.0 would avoid the bug; the y scale factor could be different from unity.
- Glrx (talk) 14:58, 31 July 2024 (UTC)
- x scale > 1, y scale = 1 does shift to the right. x scale = 1, y scale > 1 does not do as I expect (shifts to the left!).
- Glrx (talk) 15:32, 31 July 2024 (UTC)
I wish to ask if there is already a Phabricator report for this issue? --Minoa (talk) 15:36, 31 July 2024 (UTC)
- User:JoKalliauer diagnosed this problem in Phab:T370044. Glrx (talk) 17:14, 31 July 2024 (UTC)
- See also: https://gitlab.gnome.org/GNOME/librsvg/-/issues/1109 (titled: transform of Text in Pattern with text-anchor="middle" not centered). I hope that they will correct the issue soon because I have a plan to compact and validate the SVGs in the Tabliczka set. --Minoa (talk) 09:24, 4 August 2024 (UTC)
- Note: Similar issues have been reported on
- http://en.wikipedia.org/w/index.php?title=Wikipedia:SVG_help&diff=prev&oldid=1232861961
- http://commons.wikimedia.org/w/index.php?title=User_talk%3ACmglee&diff=905204964
Retouched or wierd artifacts?
File:Катер специального назначения П-474 695 на дне ВМФ 2024.jpg, taken during the annual Russian military parade in Sankt Petersburg 2024 has some ominous stuff going on. The blueshirt crewmen fourth and six from the left seem to have other parts of the image blended over them, same can be spotted near the stern of the ship, where the rigid inflatable boat is stored. I am well aware of an increased need for security measures concerning publications during wartime, but whatever they tried to hide here - it could have been done less sloppy. Or could this just be a technical phenomenon, linked to converting an image file or some graphic software? Alexpl (talk) 13:07, 1 August 2024 (UTC)
- @Alexpl: I cannot imagine that this is a technical problem. Specifically the bit under the crane is not simply a circle, but looks like a lightly feathered stroke with a clone brush. TilmannR (talk) 04:21, 4 August 2024 (UTC)
- @TilmannR: Yes, that seems to be what the uploader used - in a random and incomprehensible fashion. Alexpl (talk) 13:08, 4 August 2024 (UTC)
- @Alexpl: Perhaps they edited the image accidentally and didn't notice.
- @Okras: Hi. Thanks for uploading the image of that interesting-looking ship. Do you have a version without the edits? Or is there a reason for why it was edited? TilmannR (talk) 19:29, 5 August 2024 (UTC)
- @TilmannR:File:Малый ракетный корабль Одинцово 584 на дне ВМФ 2024.jpg has the same stuff in it. Mostly on that roof on the left. Alexpl (talk) 20:45, 5 August 2024 (UTC)
- @Alexpl, sorry, these are indeed artifacts from the heal brush. I had to remove traces of dust from the camera matrix. I did this in batches in Lightroom, but did not notice that it was not done correctly everywhere. Now I have corrected this and several other images.Okras (talk) 08:56, 6 August 2024 (UTC)
- @TilmannR: Yes, that seems to be what the uploader used - in a random and incomprehensible fashion. Alexpl (talk) 13:08, 4 August 2024 (UTC)
The XML in the uploaded file could not be parsed
I'm trying to upload a new version of File:Sieve of Eratosthenes animation.svg, but every time I try to do it I'm getting "The XML in the uploaded file could not be parsed". I'm just adding <text systemLanguage="pt" xml:lang="pt" x="356" y="29" style="font-size:12px">Números primos</text>
. Vinickw✉ 17:00, 3 August 2024 (UTC)
- xml:lang is not needed, and each string set must be in a switch tag, e.g.
<switch> <text systemLanguage="pt" x="356" y="29" style="font-size:12px">Números primos</text> <text x="356" y="29" style="font-size:12px">Prime numbers</text> </switch>
- Good luck, cmɢʟee ⋅τaʟκ 17:16, 3 August 2024 (UTC)
- The last file upload was in 2015. If I try to upload the file, I get the same error you did. The SVG validates except for 3 minor errors. I believe the file is being rejected for using
set
. A security scan (added since 2015) probably sees that element and gives up. It is worried that somebody might do malicious things with it. I will need to look further. Glrx (talk) 18:18, 3 August 2024 (UTC)- @Glrx: You mean all those 179 sets? I don't even know how asvg works, and the rsvg's thumb doesn't even display as intended, so I think I'm not going to fix this. Just converting it to a gif will do the trick. Even though, thanks. Vinickw✉ 19:39, 3 August 2024 (UTC)
- set is a SMIL tag used for interactive SVG and shouldn't cause trouble unless the parser is broken. cmɢʟee ⋅τaʟκ 20:06, 3 August 2024 (UTC)
- P.S. File:Comparison of notable bridges SMIL.svg for example, uses set and works fine. cmɢʟee ⋅τaʟκ 20:14, 3 August 2024 (UTC)
- I've used SMIL animation, too.
- I edited the file a little and then tried to upload to File:Test.svg. I get the error "%error_body_content%". Glrx (talk) 23:47, 3 August 2024 (UTC)
- Phab:T371424 for %error_body_content%. Glrx (talk) 23:51, 3 August 2024 (UTC)
- I did some minor cleanup (title and desc elements; remove CDATA; add spaces to CSS; promote some text attributes to the switch) , added pt, and was able to upload the file. Glrx (talk) 00:24, 4 August 2024 (UTC)
- I can upload the previous version (no changes), too. I do not see what was broken. Glrx (talk) 00:33, 4 August 2024 (UTC)
- The file was UTF-16. I wonder if WMF's XML parser cannot handle that or if a BOM was missing. Glrx (talk) 02:55, 4 August 2024 (UTC)
- Well done with the debugging, Glrx!
- The file was UTF-16. I wonder if WMF's XML parser cannot handle that or if a BOM was missing. Glrx (talk) 02:55, 4 August 2024 (UTC)
- I can upload the previous version (no changes), too. I do not see what was broken. Glrx (talk) 00:33, 4 August 2024 (UTC)
- I did some minor cleanup (title and desc elements; remove CDATA; add spaces to CSS; promote some text attributes to the switch) , added pt, and was able to upload the file. Glrx (talk) 00:24, 4 August 2024 (UTC)
- Phab:T371424 for %error_body_content%. Glrx (talk) 23:51, 3 August 2024 (UTC)
- @Glrx: You mean all those 179 sets? I don't even know how asvg works, and the rsvg's thumb doesn't even display as intended, so I think I'm not going to fix this. Just converting it to a gif will do the trick. Even though, thanks. Vinickw✉ 19:39, 3 August 2024 (UTC)
- The last file upload was in 2015. If I try to upload the file, I get the same error you did. The SVG validates except for 3 minor errors. I believe the file is being rejected for using
Some "HS icons" SVG files are broken
Hello, I noticed that some SVG files in Category:HS icons (namely File:HSContribs.svg, File:HSEmail.svg, File:HSHome.svg and File:HSSubpages.svg) are broken. Browser complains about some undefined namespaces. Od1n (talk) 18:22, 3 August 2024 (UTC)
- The SVG files are broken. They must define the namespaces. WMF's old rasterizer used to ignore missing namespaces, but that's the wrong thing. https://www.w3.org/TR/xml-names/ says
- Namespace constraint: Prefix Declared
- The namespace prefix, unless it is xml or xmlns, MUST have been declared in a namespace declaration attribute in either the start-tag of the element where the prefix is used or in an ancestor element (i.e., an element in whose content the prefixed markup occurs).
- Glrx (talk) 18:33, 3 August 2024 (UTC)
- @Od1n: I added
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
to the<svg>
tags of the files. Alternatively one could have removed all attributes that start withsodipodi:
orinkscape:
from the files. TilmannR (talk) 04:07, 4 August 2024 (UTC)
- @Od1n: I added
SVG file not appearing, Argentina arms
Hiya! This file is not appearing correctly for me. It shows fine when I go to the file's direct link, instead of its description page, and as far as I am aware, this isn't only an issue on my end. I couldn't see it appearing correctly in previous versions, either, but it is used on several projects, so it has surely worked at some point. Is there any way to fix this? Is this a known issue? I'm not super-knowledgeable about SVG files or where to report issues like this on Commons, so I hope I'm asking in the right place! EdoAug (talk) 03:29, 6 August 2024 (UTC)
How can I add an image without a frame with a description text?
I have tried to do it but I don't know how:
Is this the correct code to do it??????????
please help Risantana (talk) 11:13, 8 August 2024 (UTC)
File:Micronesian languages.en.svg
At File:Micronesian languages.en.svg, the file has a code error. I am unable to fix it because I don't have SVG. It seems to be related to User:Rillke/SVGedit.js code. Tbhotch™ 05:43, 15 August 2024 (UTC)
- looks like a namespace issue:
- error on line 5 at column 57: xmlns:i: '&#38;#38;#38;#38;#38;#38;ns_ai;' is not a valid URI
- Fixed it (at least so my browser does not complain), but WMF rasterizer may be throttled right now.
- Glrx (talk) 16:13, 15 August 2024 (UTC)