Commons:Graphics village pump/October 2009

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

Resizing SVG in Inksacpe[edit]

I've created the file File:United Kingdom Flag Specifications.svg using File:United Kingdom Flag.svg using Inkscape and I tried and failed it to fit all the objects added. I tried to go to "Document Properties" and clicked "Fit to Selection", but it also scaling the objects so it goes out of the borders everytime. How can I solve it? GilCahana (talk) 09:56, 3 October 2009 (UTC)[reply]

Many flags are simple enought to code by hand, see the source code of File:UK.svg. /Pieter Kuiper (talk) 10:04, 3 October 2009 (UTC)[reply]
Thanks, but that doesn't answer my question. I tried also to change the height and width in XML Editor, but still the objects scaled with the change. I'm not that good in XML so maybe I should have done more than that. GilCahana (talk) 10:50, 3 October 2009 (UTC)[reply]
Well I managed somehow using the XML editor. But there's got to be an easier way to do that. Thanks anyway. GilCahana (talk) 16:51, 3 October 2009 (UTC)[reply]
Inkscape has a tendency to resize when you use the "Fit to Selection" option. What I normally do is group all of the objects together, check the size of this object then create a new inkscape file with those sizes (possibly adding a bit of whitespace around it). Then it's simply to copy the group into the new image, move it to the desired position and ungroup it. /Lokal_Profil 22:57, 3 October 2009 (UTC)[reply]

Signatures to SVG[edit]

Is there someone who would be interested in converting File:Rob Wonderling sig.gif, File:TomCorbettSignature.jpg and File:Leachsig.png to SVG format, like File:Sarah palin signature.svg? Thanks folks,--Blargh29 (talk) 04:58, 5 October 2009 (UTC)[reply]

✓ Done Fresh helping from me to you. Find them at File:Rob Wonderling sig.svg, File:TomCorbettSignature.svg and File:Leachsig.svg! Hope you enjoy, Nesnad (talk) 09:53, 6 October 2009 (UTC)[reply]

[edit]

I'm missing a decently sized logo of the w:Railroad Retirement Board (pic). Could someone create it? Maybe someone finds a larger sized GIF anywhere in the internet to start from scratch (or upload a large-scaled image). Thanks, --Mattes (talk) 14:21, 20 October 2009 (UTC)[reply]

✓ Done Well.. sorta. The original logo's color scheme is a bit messy, and my logo attempt was a bit quick and dirty I suppose. I hope it works for now? It's a SVG file. And the nature of Wikipedia and Wikimedia means that it will be improved if others feel like it. Anycase, enjoy. File:Railroadretirementboardlogo-color.svg I took the liberty of adding it to the page in question for you. Cheers, Nesnad (talk) 15:53, 20 October 2009 (UTC)[reply]

Arrow alignment[edit]

Hi!

Does anybody knows how to align the arrows which are at C and F in this image?

When I open it at Inkscape it is aligned but after the upload it is not... I didn't understand what I'm doing wrong... Helder 00:33, 27 October 2009 (UTC)

This looks fine to me, I do not see a problem. However, in the image on File:Exercise 6 (Thales theorem).svg I see a problem with the "2" of 20. /Pieter Kuiper (talk) 20:38, 28 October 2009 (UTC)[reply]
I can see it in your first version, User:Justass corrected it. For the future: If you are using markers, you have to take care that the last Bezier "handle" (control point) is not in the same place as the last point of the line. Either use straight lines, or move the handle out to give it a direction. --Hk kng (talk) 18:49, 29 October 2009 (UTC)[reply]

SVG rendering of maps[edit]

Hello

I have uploaded several maps of abandoned railways in Slovenia. Usually I export a relavant area from OpenStreetMap (one of rare sites providing maps under a free license) into SVG, open this in Inkscape, draw something (e.g. curves) into it and upload it as a SVG file. Until recently it worked perfectly. However, two recently uploaded maps are not rendered correctly. In both cases Inkscape displays them correctly. Even if I click links to SVGs on both files' pages, my Firefox displays both of them as expected. The first one is File:Cave del predil Log-pod Mangartom tunnel map.svg. It displays a violet triangle in the upper right corner, which is not expected. The other one, File:Railway lines in Borovnica area-map.svg, is even more "interesting". It lacks even many elements from the original OpenStreetMap map, not to mention those coloured lines, explained in the file's description. It should render into sth. like this. Besides this, size of this SVG file is much smaller than of other maps, but when opening it in Inkscape, it consumes significantly more CPU power than other similar maps (it almost halts my computer!). Although the validators do not report anything suspicious, I wonder if something is wrong with this file. There are two versions of this file, the older is in Inkscape SVG (no problem with it until recently), the newer is converted into plain SVG and with vacuumed defs.

I know that converting both files into a bitmap (e.g. PNG) and uploading them could be a workaround, but I want that other people have chance to improve them and SVG is much more appropriate for this. --Ajznponar (talk) 20:19, 28 October 2009 (UTC)[reply]

I absolutely don't know Inscape, so can only provide some hints not really solutions. In your file File:Cave del predil Log-pod Mangartom tunnel map.svg you use about 20 times bigger area map than actual visible part, it should be reduced by deleting unused vectors that aren't visible and don't serve any purpose. Besides in your SVG you embedded 7 raster image files (those little icons of town, some blue icon on left side, and road number marks). I uploaded another version, reduced some unused parts, and as you can see wiki renders it correctly except for the 2000px size image, but at 1999px [1] or 2001px [2] everything looks normal, so cant realy say what the problem is --Justass (talk) 22:31, 28 October 2009 (UTC)[reply]

Which of these SVGs is better?[edit]

I tried my hand at editing the SVG code of File:Plus-,minus-,and equality-sign.svg to make it SVG valid and to reduce the file size, and I think that I succeeded. The file size was reduced from 26 to 4 KB—fairly significant, I think—and it now validates at the W3C validator. I was wondering if somebody more well-versed in SVG than myself could look at the code and let me know if it is an actual improvement or not... as part of reworking it, I removed various namespaces and the metadata which don't actually add anything to the visual appearance of the image. See Media:Plus-,minus-,and equality-sign.svg (original) and (my version; will likely be overwritten at some point with a completely different image). Any advice on if I shouldn't have removed/modified something would be much appreciated. If it all looks good, is it worth doing this to more SVGs to reduce the file size and make them validate correctly, or is it not really significant? Thanks! Drilnoth (talk) 18:52, 30 October 2009 (UTC)[reply]

Did you do anything in addition to removing Inkscape/Sodipodi specific parts? If not, your work may have been educational, but it can be achieved fairly automatical. The file originates from Inkscape, where you have the choice to save it in two formating variants: "Inkscape SVG" has programm-specific elements as in the original, "Plain SVG" produces output just as your edit. So, you don't have to do it by hand.
Please note that there is no advantage to re-uploading files in the "plain" variant. Renderers (either server-side for the preview images you see on File pages or browsers when looking at them directly) will just ignore elements that do not belong to svg or other officialy supported namespaces (xml and xlink, mainly).
File size is equally immaterial, since in 99% of all cases user will only download the PNG previews and not the originals. Processing times for the production of these previews is also not really dependent on size, but on the complexity of the necessary computations. Some filters for example might only have three or four lines in the file, but take up to ten seconds to compute even on modern processors. --Hk kng (talk) 19:40, 30 October 2009 (UTC)[reply]
I agree. But simple diagrams like these can be coded by hand, see Category:Manually coded SVG for examples. The main advantage is that it is easier to modify such figures. /Pieter Kuiper (talk) 19:57, 30 October 2009 (UTC)[reply]
(@ Hk kng): I basically removed extra whitespace, the inkscape and sodipodi namespaces, and the metadata, and did some reorganization for readability. I thought that reducing the file size would make it load faster... wouldn't the PNG take less time to build, at least?
Anyway, it seems I had made a typo or something... the validator is now saying that my version also fails. :/ Anyway, thanks for your time! Drilnoth (talk) 22:14, 30 October 2009 (UTC)[reply]

Image extraction from book scan data[edit]

[I hope this is the right forum, move the post if it is not]

I often need to extract details from scanned books, but I uncertain of the optimum method for doing so. Restoration is not the problem, in fact that is not appropriate for the intended purpose. I understand that PNG is considered to be desirable, so I have previously converted files to that format. I have had moderate success with cropping details from jp2 files, found at sites like archive.org, but these are not always available. The widely used djvu format is not appropriate for this purpose, the strength of that format is in handling and compressing the text of book scans. The current example is File:Blake by Linnell (as Story's frontispiece).png (from a TIFF) and File:Blake by Linnell (as Story's frontispiece) 2.png (PDF). I would like to document the 'best practice' and a simple workflow, for the benefit of other contributors, so any help would be greatly appreciated. cygnis insignis 10:34, 12 October 2009 (UTC)[reply]

This is a very late reply, but I think you should take a look in Help: space to see if there is any similar advice (probably not). Otherwise you could start your own article ... ButterStick (talk) 13:08, 10 March 2010 (UTC)[reply]