Commons:Graphics village pump/December 2018

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

Problem with colors in SVG rendering

Full view vs preview

Hi, I have two small problems concerning File:Sinsheim in Sinsheim.svg, which was created in QGIS and then edited in Inkscape. The highlighted color is supposed to be      #c12737 and shows as such in the full svg view in Firefox as well as is the preview thumbnail before uploading the file. What should I change so that it is also rendered correctly by the Mediawiki software? Also, I'd be glad about font recommendations that look better in the thumbnail. Cheers, --Földhegy (talk) 07:23, 28 November 2018 (UTC)

@Földhegy: I don't see any rendering problems. (The color seems to be right?)
If you want font-recomendations, please look at File:MediaWiki_SVG_font_list_sans.svg, File:MediaWiki_SVG_font_list_serif.svg and meta:SVG_fonts.
I would say the three most common fonts might be: "Liberation Sans,DejaVu Sans,Liberations Serif"
 — Johannes Kalliauer - Talk | Contributions 16:33, 28 November 2018 (UTC)
Hm, very interesting - the color seems to be right for some browsers, but in Firefox, there is a difference between the thumbnail/preview and full view (only the svg in full view shows the color correctly), see image attached. And thanks for the recommendations. --Földhegy (talk) 22:11, 6 December 2018 (UTC)
@Földhegy: Thanks for the Preview. Now I know what you are meaning. But my Firefox 63.0.3 (Windows) this problem does not occour. Can you add which Picture is the Wiki-PNG(Which resolution) and which is the SVG. And add a URL-link which Version you are refering. f.e for the last version you uploaded:
 — Johannes Kalliauer - Talk | Contributions 07:51, 7 December 2018 (UTC)
In File:Preview vs full view color rendering.png, the SVG (2018-11-28, 16:22 [the current] version) is on the left, the 800px wiki-PNG on the right. Unfortunately I don't know how to get the permanent link to the current version, but the problem persists :( --Földhegy (talk) 16:51, 8 December 2018 (UTC)

SVG image cannot be uploaded due to (incorrect?) MIME specification

In order to adhere to the (new?) requirement to specify "MIME-type" I included 'type' in the SVG tag:

<svg height="1600" width="1600" xmlns="http://www.w3.org/2000/svg" type="image/svg+xml">

Still I get the error message when uploading: "File extension ".svg" does not match the detected MIME type of the file (text/plain)." What shall I change?

Stamcose (talk) 18:58, 27 December 2018 (UTC)

I dont have problems uploading

@Stamcose: I just uploaded

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg  PUBLIC '-//W3C//DTD SVG 1.1//EN'  'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
<svg width="1600" height="1610" type="image/svg+xml" version="1.1" xmlns="http://www.w3.org/2000/svg">
 <metadata>
  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
   <cc:Work xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <dc:format>image/svg+xml</dc:format>
    <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
   </cc:Work>
  </rdf:RDF>
 </metadata>
 <path d="m1332 1046-105-115-112-106-121-98-128-87-134-78-140-67-145-56-149-44-151-33" fill="none" stroke="#000"/>
 <path d="m550 1033 250-433-44-25" fill="none" stroke="#008000" stroke-width="4"/>
 <path d="m506 1008 294-408" fill="none" stroke="#f00" stroke-width="4"/>
 <path d="m843 625-43-25 14-25" fill="none" stroke="#000" stroke-width="4"/>
 <path d="m857 600h-57" fill="none" stroke="#a52a2a" stroke-width="4"/>
 <path d="m60 1120h50v50h-50z" fill="#f00"/>
 <text x="160" y="1150" font-family="Verdana" font-size="20">Gravitational force off-set towards the pole from the local vertical</text>
 <path d="m60 1220h50v50h-50z" fill="#008000"/>
 <text x="160" y="1250" font-family="Verdana" font-size="20">Decomposition of the gravitational force in a vertical and a horisontal component</text>
 <path d="m60 1320h50v50h-50z" fill="#a52a2a"/>
 <text x="160" y="1350" font-family="Verdana" font-size="20">"Centrifugal force" orthogonal to the polar axis</text>
 <path d="m60 1420h50v50h-50z"/>
 <text x="160" y="1450" font-family="Verdana" font-size="20">Decomposition of the "centrifugal force" in a vertical and a horisontal component</text>
 <text x="10" y="1550" font-family="Verdana" font-size="18">The Earth has an oblate shape such that the horisontal component of the gravitational force prevents a mass point at rest on the surface to slide away towards the equator</text>
</svg>

to File:The_shape_of_the_rotating_Earth_3.svg. I think there you have to post the whole file.  — Johannes Kalliauer - Talk | Contributions 21:52, 27 December 2018 (UTC)

It must have been some temporary problem on the Wikimedia side. The unchanged file uploaded without problem today! It is: https://commons.wikimedia.org/wiki/File:Mass_point_affected_by_coriolis.svg

Thanks for your support! Stamcose (talk) 19:18, 28 December 2018 (UTC)

Bug in rendering of SVG patterns

~Hi. Example below, where SVG patterns are displayed differently for e.g. 145px and 146px image size. Please consider how to fix this bug. Image in question, with a standard striped pattern from Inkscape: File:Coat of arms of Europe (hatched).svg. Thanks!

-Ssolbergj (talk) 11:19, 28 November 2018 (UTC)

Pattern only rudimentary supported
see Librsvg_bugs#Pattern for more information.
 — Johannes Kalliauer - Talk | Contributions 16:36, 28 November 2018 (UTC)
This bug happens, when the individual cells that the pattern consists of cover only a tiny area. I don't know exactly why it fails, but I encountered the same problem with Ducktales2017Logo.svg. You can circumvent the bug by combining multiple repetitions of the pattern into one larger version. E.g. I fixed the thumbnail of Coat of arms of Europe (hatched).svg by having the pattern cover four lines instead of one. TilmannR (talk) 17:17, 28 November 2018 (UTC)
Well, this bug has clearly has been known for some time. I hope someone can fix it; in the meantime I'll use your fix, TilmannR. Thank you! - Ssolbergj (talk) 21:00, 28 November 2018 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment.  — Johannes Kalliauer - Talk | Contributions 22:51, 30 December 2018 (UTC)