Wikipedia:SVG help/Archive 2

Image:Intel Core i7.svg
Appears to be some rendering issue with this particular file. As you can see from the upload history I've tried saving it with a couple of different options (with and without font embedding (latest version uses outlines), etc). If you go directly to the thumbnail image you can see a text based error message:

Error generating thumbnail

Error creating thumbnail:

(process:2554): libgnomevfs-WARNING **: Unable to create ~/.gnome directory: No such file or directory

(process:2554): GLib-CRITICAL **: file garray.c: line 609 (g_ptr_array_add): assertion `array' failed

Any thoughts/ideas? I'm thinking its the embedded images, but maybe it's something simple. :P Maybe it'd be wiser to ask on WP:VPT, as it may be something only a dev can fix, but I thought I'd ask here first. =) —Locke Cole • t • c 02:19, 11 August 2008 (UTC)


 * Comment After uploading Image:Intel_Core_i7-test.svg, where I, on the first upload, removed the embedded images and the px specifier (which I then left out after the second upload), the remainder of the image worked. The second upload did not (restoring the embedded image). I guess my comment here would be "why svg?" If you are embedding images in the svg file, it kind of defeats the point -- its not really scalable anymore. Much better to upload it as PNG, and not let anyone think that it is completely rescalable under false pretenses. From a technical standpoint, it seems that the mediawiki engine is not rendering the embedded images. Personally I think that is a good thing, as it prevents people from uploading non-scalable SVGs, even inadvertently . On the other hand, I am uncertain as to the specifications standpoint on this -- not adhering to standards is generally bad IMHO.
 * As a side note, you may or may not be aware that scalable graphics for free content is questionable, due to the fact that you cannot satisfy the "used at low resolutions" for derivative works. User A1 (talk) 07:42, 11 August 2008 (UTC)
 * Thanks for trying it out. When I open the file in Illustrator CS3 (which I'm by no means an expert with) it appears those static images are called "meshes" (when viewed in the layers). Is there a better (or even an alternate) way to convert EPS to SVG? Perhaps it's just Illustrator. —Locke Cole • t • c 16:32, 11 August 2008 (UTC)
 * Apparently Inkscape can open EPS files. might be worth a shot User A1 (talk) 23:52, 11 August 2008 (UTC)

Image:Eukaryota tree.svg
I've got a problem with this .svg image. I think it is caused by an object in the middle of the picture which was created in photoshop and then pasted into inkscape. There must be a second problem though - image seems to be too small when uploaded to commons. --Vojtech.dostal (talk) 07:36, 13 August 2008 (UTC)
 * reply - Pasting, inserting or otherwise attempting to include raster data in the svg will not work. Looking at the file itself:

xlink:href="C:\Documents and Settings\Pavel\Dokumenty\strom.png" sodipodi:absref="C:\Documents and Settings\Pavel\Dokumenty\strom.png"
 * This indicates that the SVG file you uploaded has a link to a file on your (home/work/wherever) computer's hard drive. When rastering the image, Mediawiki's software is attempting to locate the file "C:\Documents and Settings\Pavel\Dokumenty\strom.png" -- which is located on your computer, which the server does not have access to :) . As such this is not going to work, there is no way for mediawiki to access this data. Therefore you cannot include raster information in the file in this manner. It is technically possible to embed the image information in, but you really don't want to, as it elimates the concept of "scalable" vector graphics.
 * If you want to do include this information you will need to convert the image "C:\Documents and Settings\Pavel\Dokumenty\strom.png" to vector form. So you will have to trace the image either by hand or by using inkscape's automated tracing methods to trace the image (raster to vector conversion), see My comments regarding Image:Auagrouplogo.svg below. User A1 (talk) 08:02, 13 August 2008 (UTC)
 * Thank you very much! It was really the problem of transfering "object to curse". Now it seems to be OK. --Vojtech.dostal (talk) 09:58, 13 August 2008 (UTC)
 * Oh no, it does not properly work again - I did some corrections and it fails to work. --Vojtech.dostal (talk) 09:00, 16 August 2008 (UTC)
 * Well, in fact, it sometimes does work (now on cs:Klasifikace eukaryot and en:Eukaryote), but for exemple it fails tu load on cs:Eukaryota.

Image:Hmac.svg
Any idea why those black rectangles are appearing? =Nichalp  «Talk»=  06:54, 14 August 2008 (UTC)
 * reply - It appears to be due to the use of the tag. By elimnating these, I remove the problem. It would appear that RSVG is not properly supporting the SVG 1.2 flowroot tag, and is incorrectly drawing it as black boxes. By using a text editor and deleting everything between and the problem is gone. However if you have multi-line text, or flowed text this may re-appear.... User A1 (talk) 11:20, 14 August 2008 (UTC)
 * comment - A nasty hack that you can do to get around it would be to stroke the text. User A1 (talk) 11:45, 14 August 2008 (UTC)
 * Thanks! Kinda a month late. I fixed the issues. =Nichalp   «Talk»=  08:52, 19 September 2008 (UTC)

Image:Kazakh Khanate.svg
No thumbnail is being generated for this file. I created it in inkscape, and it renders fine in rsvg-view version 2.14.4 on my computer, and mozilla renders it just fine as well. I simplified it as far as I could by removing superfluous tags, but it still doesn't seem to work. Is there something wrong with the headers? Slashme (talk) 08:58, 16 August 2008 (UTC)


 * Interestigly, the thumbnail at http://upload.wikimedia.org/wikipedia/commons/thumb/a/ad/Kazakh_Khanate.svg/120px-Kazakh_Khanate.svg.png works OK. --Slashme (talk) 10:01, 16 August 2008 (UTC)

Image:Flag of Golden Horde-2-.svg is giving me a similar problem. --Slashme (talk) 11:16, 16 August 2008 (UTC)

Don't worry, it just seems there was a delay in generating the thumbnails. --Slashme (talk) 13:50, 16 August 2008 (UTC)

Image:Map_of_the_Manchester_Bolton_and_Bury_Canal.svg
Anyone any idea why this file doesn't display unless clicked upon? File created in Inkscape on Windows. Parrot of Doom (talk) 16:33, 28 August 2008 (UTC)


 * reply - I just figured it out by reading another reply here. It was because of the presence of a jpg in the background, once I deleted that the problem went away. Parrot of Doom (talk) 16:35, 28 August 2008 (UTC)

Image:Tax rate example.svg
One tiny little black rectangle! Argh! I did stroke to path, I did text to path, but it's got this one problem. I used Inkscape 0.45; so how do I prevent this in the future? BlueNight (talk) 19:43, 1 September 2008 (UTC)
 * There were two problems, the lines with the arrows needed to be stroked to path, and I couldn't get rid of the ... tags in inkscape, I had to use a text editor to get rid of it. User A1 (talk) 01:18, 2 September 2008 (UTC)

Image:Kilometro cero en España.svg
Hi there. I seem to have a problem with the Mediawiki rendering of a particular svg file that is rendered just fine by Firefox 3.0 on my stock Ubuntu Hardy box. In particular, the "ORIGEN DE LAS CARRETERAS RADIALES" text that appears on the image should be _in_ the red stripe as in this photo. I downloaded rsvg (version 2.22.2) and tried to render the image myself so I could test what was wrong, but _my_ rsvg also rendered it wrong and different from the Mediawiki rsvg (in my case, the text disappeared altogether). What could be wrong, given that the SVG file validates with the W3C and shows fine in Firefox? Thanks in advance. Habbit (talk) 23:45, 18 September 2008 (UTC)
 * reply -I suspect that this may be another example of the flowed text problem; As SVG 1.2 Tiny is still in the beta phase, I have little faith in the usefulness or applicability of the validator, at least until SVG 1.2 is finalised. Currently flowed text may cause problems -- I think this is an example of this. If you convert the text to path information inside your editor before saving the SVG, this should solve the problem. I can do this for you at a later time (~12 hrs) if you need. Editors are currently trying to pre-empt the SVG 1.2 specification to provide functionality, at the cost of compatability. User A1 (talk) 02:41, 19 September 2008 (UTC)
 * I think the text is not "flowed" in the sense you mean it, i.e. flowed in a text bow with flowRoot elements et al: it is text which 'snaps' to a path, and it validates as SVG 1.0, not a thing about 1.2 or whatever. Batik 1.7 renders the oh-so-complex text fine (but fails to render the über-simple "Km. 0" text u_u). I will try converting the text to a path and uploading the image again. Habbit (talk) 09:15, 19 September 2008 (UTC)
 * By the way, this is marked as "resolved"; and it is in the sense that it now displays fine in Mediawiki, but it's not in the sense that librsvg will fail to display perfectly good SVG 1.0. Thus, could anyone tell me where can I report the upstream (librsvg) bug? --Habbit (talk) 09:27, 20 September 2008 (UTC)
 * comment -- My scope here limits it to "getting it working". If you want to file a bug, then you can do so here. Just make sure that you know which program is showing the bug, and can produce something the developers can work with. Examining their CHANGELOG, I would suggest that development of the library at this stage is restricted to maintenance rather than active development. That said, I am not an expert in their project. User A1 (talk) 03:40, 21 September 2008 (UTC)

Problems with Image:Alternative Subway Logo.svg
It should look like this. So far, nothing "came up". Do you suggest any solutions for this? -iaNLOPEZ1115 02:12, 20 September 2008 (UTC)
 * reply -- Looking at the contents of the file




 * The problem is twofold. Firstly the file this is referring to is located on your home computer, not on the server. Secondly, unfortunately you can't just cut and paste an image into inkscape to convert an image to vector. If that were the case we would have bots doing this already :). You have to do this manually. See my response to "Image:Eukaryota tree.svg". Additionally converting this to vector is murky waters, as one of the defences for using non-free content is that typically a low resolution image is used, thus this cannot be seen as impinging on the rights of the content owner under US law -- Fair use. However SVGs are a mathematical representation of the data and can be converted into a raster image representation at any size. User A1 (talk) 05:49, 20 September 2008 (UTC)
 * I give up on this. tried to treace it, and nothing happens. Got any other suggestions that are more specific? -iaNLOPEZ1115 07:47, 20 September 2008 (UTC)
 * reply - Not sure how I can be more specific unfortunately. raster data is not vector data. You will have to, on your home computer, draw over the top of the image that you pasted into inkscape and then delete the linked image - that's important. There is a tutorial here for using the automatic tracer. Most likely you will have to tweak the image after running the automatic tracing program. User A1 (talk)
 * I might be able to solve this, but unfortunately, I don't take the risks with non-free images. Why not just leave it as png, since this is a logo?   Zoo Fari  02:45, 18 December 2008 (UTC)

Image:Barack_Obama_signature.svg
Kermit2 (talk) 16:30, 14 October 2008 (UTC) Most .SVG files on Wikipedia don't render correctly, or at least usefully, for me in Firefox 3.0.1. I suspect they are "working" but are using a transparent background, so when my background is the same as their foreground, I don't see anything. Unless this is a Firefox problem, then it should be specified in a guideline that either the background color be specified, or foreground color be unspecified.
 * Works fine in Firefox 2. Yes background is transparent but unless you use a black background it shouldn't be a problem. /Lokal
 * I'm using a black background. /kermit2

_Profil 16:48, 14 October 2008 (UTC)

es:Wikiproyecto:Ilustración/Taller gráfico/Problemas típicos con SVG en Wikimedia fr:Wikipédia:Atelier graphique/FAQ SVG

Image:COA of Denmark.svg
Old version without patterns does not show correctly at 100px: Image:COA of Denmark.svg (look in the file history). --Ysangkok (talk) 17:44, 24 October 2008 (UTC)
 * Im a little unclear -- you reverted to an earlier version -- is the patterned supposed to be an improved version of the current one? I looked at both versions on my machine, and I can *see* the difference, I must be missing something... User A1 (talk) 23:50, 24 October 2008 (UTC)
 * The version which ought to work is the one from 16:17, 24 October 2008. It has patterns. But when resize to below 125 pixels in width, it does not show correctly. This can be seen in the preview of the old version. The newer versions are just tests so I could find out what made the error occur. I found that it was the patterns. I tried removing inkscape-related tag and thus making the file a W3C valid SVG file, but it still shows up corrupted. If the errors are removed from librsvg (and thus MediaWiki) the 16:17 version should be restored. --Ysangkok (talk) 20:48, 25 October 2008 (UTC)

Image:Gavambhodi scale.svg
I thought it was a cache problem but since another user cannot see this image too, help is needed to ascertain why this is happening. =Nichalp  «Talk»=  07:59, 26 October 2008 (UTC)
 * Reply-The image contained the following XML:


 * This means that the SVG file was looking for an image that was on your machine, which doesn't exist on wikipedia's machines, which is causing the problem. I assume you traced over this image, and forgot to remove it? Anyway, I have fixed it now. User A1 (talk) 09:38, 26 October 2008 (UTC)
 * Oh yes. I had deleted the layer that the image was on, but I did not know remnants were still present. Thanks for the fix. Regards, =Nichalp   «Talk»=  09:44, 26 October 2008 (UTC)

SVG from Inkscape
I uploaded an image of a map I created today at Wikimedia commons from inkscape:. However, the image doesn't show up. Does anyone know what I did wrong? Thanks for your time,  α Яβ ιτ Я α Я ι ŁΨθ  ( talk ) 16:02, 9 November 2008 (UTC)
 * The image you have uploaded is not actually SVG per se, examining the content of the file using a text editor, I found:



Its an SVG file that is linking to a bitmap file (bmp), which is a raster format. Furthermore, this file is located on *your* computer -- to which wiki doesn't have access. As such (1) it has no idea what the content of the file is, and (2) even if it did have access wiki would still fail to render it, as it is not a vector graphics image. Unfortunately, one can't just cut'n'paste bitmap data into a vector editor and expect vector data to come out, vector and raster data are two different things. User A1 (talk) 22:44, 9 November 2008 (UTC)
 * Okay, thanks.   A rbitrarily 0    ( talk ) 00:52, 20 December 2008 (UTC)

Image:Stardistfarpi.svg
I already got help for a similar graphic which  put into the right preview order. My question: is there a tool which can put text into right place for preview? Berklas (talk) 10:01, 15 November 2008 (UTC)
 * Looking at FischX's reply, he says he used a regular expression (regex for short) to solve it. A regular expression is simply a short bit of text that instructs a regular expression program to make the changes you want. If you know what the regular expression FischX used was, or know how to write one, you can use the "find and replace" box of any text editor that supports regular expressions. Under Linux most editors will support this method, under windows I think notepad++ will support regexs. Alternatively there are command line programs that can do it as well, such as sed.
 * Using a diff program to look at each file before and after fischX modified at it doesn't show me the exact change that was made -- all FischX says is that he fixed up the text's X coordinate value, I haven't looked to see exactly how. If it is difficult to get FischX's to respond I can have a closer look and work out what is the regex that you need and post it here. Let me know how you go. User A1 (talk) 12:12, 15 November 2008 (UTC)
 * Hmm. It appears to work fine under my version of RSVG. I don't know *precisely* what the problem is, so I will have to do an upload-debug cycle with wiki to work it out. User A1 (talk) 12:29, 15 November 2008 (UTC)
 * Thanks a lot for the replies. FischX is an expert and quite busy with more important task. The structure of the processed file looks totally different compared to the source file. I have the impression that "regular expression" is only a part of the secret. Is it possible to clean up the file? I don't understand the deep nested structure. Any advice how to learn more about transformation of SVG-Files? Berklas (talk) 13:06 +18:00, 15 November 2008 (UTC)
 * I generally examine the w3c specifications as a reference -- it is quite long and boring, but is quite useful. Furthermore it is unlikely that rsvg actually implements it exactly correctly (at least the version that wiki uses), as (1) wiki uses an old rsvg  and (2) rsvg is not a highly maintained project as far as I can tell. I had a brief shot at your svg, but no luck. I will have a few more tries in the near future. --
 * Thanks for comments. I hoped there might be a tool which can simplify diagrams: from nested structure into collection of elements with specification of their position and some characteristics only. I'll dig into the definition of SVG definition to learn more. Berklas (talk) 17:03, 15 November 2008 (UTC)

Image:Buck65 vector.svg
I'm having this problem repeatedly it seems with Adobe Illustrator CS4 that there's all these empty spacings between the colored areas. I resolved this on another image by moving the pieces closer to each other, but with an image like this (rendered from a photograph) it's too much work. Does anyone know the reason for this? notwist (talk) 13:55, 1 December 2008 (UTC)
 * Check to see if you have a stroke enabled on each piece. I have not looked closely at your drawing. Though I'm not clear what the context of this image is, insofar as its use in wiki. User A1 (talk) 11:55, 18 December 2008 (UTC)

Image:Frap_diagram.svg
I recently created and uploaded a diagram of an experimental procedure in biology (FRAP)I created the image in Adobe Illustrator then saved as SVG. It looks fine when I open the file by itself in a browser, but as it appears in the smaller format, the text is scrunched up and overlapping itself. It sort of seems that the spaces have been removed. Is there some different combination of export settings in Illustrator that I can use that will allow the image to display properly? I tried selecting Font Subsetting: None (Use System Fonts) but this didn't help. MDougM (talk) 23:56, 15 December 2008 (UTC)
 * I'm not familiar with illustrator as an SVG program, so I can't comment on the specifics of that program. However I will have a look at the image in about 18hrs (bit busy right now). User A1 (talk) 12:08, 16 December 2008 (UTC)
 * Thanks for responding. I downloaded Scribus and used that to generate the SVG (after exporting to EPS from Illustrator, then importing to Scribus) and that seems to have fixed the problem. MDougM (talk) 18:33, 16 December 2008 (UTC)

Identical images render differently
Wondering if anyone can explain why the thumbnails for File:Mengjiang map 1939.svg and File:Test.svg render differently. All I've done is download the first svg file and reuploaded it as test.svg and suddenly MediaWiki renders the thumbnail in a new way. Has there been an upgrade to the svg renderer since August 21 2008 or any other change which could explain this. /Lokal_Profil 17:19, 16 December 2008 (UTC)
 * I think it is because there is a little bit of border on the right and bottom of the test version.

this made a big difference in the text. So it isn't the thumbnail, it is the entire file. I am not sure why, maybe it was you, or maybe it was Commons.  Zoo Fari  02:41, 18 December 2008 (UTC)
 * Shouldn't be anything in the test.svg that wasn't in the original. Just downloaded and uploaded without editing. /Lokal_Profil 14:52, 18 December 2008 (UTC)
 * Interesting, the SVG of the two files is completely identical. I will think about this somewhat.User A1 (talk) 22:49, 18 December 2008 (UTC)
 * Anyone figured something out yet?--SelfQ (talk) 00:05, 31 December 2008 (UTC)

Image:Asterisk Button.svg
I created this image from Inkscape, but the asterisk (*) character is missing and is replaced with a black square. What can I do to fix this problem? Is it because I used the wrong type of font, and not one of these? Thanks   A rbitrarily 0    ( talk ) 16:00, 21 December 2008 (UTC)
 * Short answer: yes. Long answer: Even when using an available font, the text may sometimes still not show, and the whole region may appear as a filled rectangle, due to the lack of consistent support for flowable text elements in the SVG spec. If this is the case, you can convert all your text into line data by using object to path in the path menu. If you open the svg file in a text editor you will see that there may be a ... element, which are not always rendered properly by RSVG. User A1 (talk) 00:08, 22 December 2008 (UTC)

HALP! Safari still gets SVG converted to PNG
I'm using Safari (native SVG support), but Wikipedia images are still converted to PNG automatically, as shown by the image's file path (on the description page). For some reason, when I was using IE7 with Adobe/Corel's plugins (tried both), the same thing happened.—Moonraker0 (talk) 06:10, 18 January 2009 (UTC)


 * This has nothing to do with the browser which you are using, and is a step taken by Mediawiki software to ensure compatibility among browers that don't support SVG. Someday, when SVG support in browers actually works on all platforms, with consistent results, you might see the SVG itself. Even then highly complex SVGs may still be rastered to thumbnails on the server side.

You can view the SVG by clicking on the image in the File: or Image: page. User A1 (talk) 06:28, 18 January 2009 (UTC)

Image:The Greenhouse Effect.svg
I am literally going to explode if I don't get this resolved. Why are some of my shapes (arrows) missing??? I did the arrows myself with a triangle and rectangles and then did a union. I then duplicated to make more arrows, but only the first few show up when I upload. I tried stroking to path, but they just disappear. Can someone please help. I'm very tense right now.  Zoo Fari  16:37, 23 January 2009 (UTC)
 * FIXED I have re-made the arrows and uploaded at a different filename, but I would appreciate if someone were to tell me why it didn't render the arrows.  Zoo Fari  22:59, 23 January 2009 (UTC)

Image:Dalmatia_Cities.svg
The above file does not generate a picture for some reason. Am i uploading it incorrectly ? Hxseek (talk) 05:17, 26 January 2009 (UTC)


 * Firstly, Vector image data and raster image data are not the same. Looking at the file I find



The resultant image is not scalable, as you have limited resolution in the linked png image. If you want scalable graphics from that information, you will need to redraw it, rather than just cut and paste image files into a vector editor. Inkscape does have autotracing algorithms, but they are invariably (1) large in resultant file size and (2) bad at segmenting images, purely due to the complexity of extracing the vector data in a sensible fashion. User A1 (talk) 22:37, 26 January 2009 (UTC)

-- Imported from User_A1 talk --
 * Thanks for your reply about SVG graphics. So are you saying that one is not able to use pre-made (eg Map) templates in Inskcape, and then add-on features ? (Ie draw 'on top' of it ) Hxseek (talk) 05:47, 27 January 2009 (UTC)

--

Not quite. You can use pre-made templates, however you need to use pre made vector graphics templates (svg files, eps and even *some* pdf data). Otherwise you are simply importing raster information into your SVG file, which won't work in a scalable fashion. If you wish to draw on top of a raster image, typified by file formats such as jpeg, portable network graphics or bitmaps, then you should use a raster image editor such as GIMP. In summary: Inkscape is for vector data only. If you need more information, This search should help you. User A1 (talk) 07:18, 27 January 2009 (UTC)

Thanks mate. One list thing, is there anyway an original .svg image can be save in .png format.

Hxseek (talk) 01:26, 29 January 2009 (UTC)

Yes, this is known as "rendering" the SVG. Wiki will do this automatically to generate thumbnails and previews, however for your own purposes you can use File->Export bitmap in inkscape. To get a better idea of how it will look on wiki, you can use the command line tool rsvgUser A1 (talk) 03:13, 29 January 2009 (UTC)


 * Much appreciated Hxseek (talk) 09:58, 29 January 2009 (UTC)

Image:4-bit_carry_lookahead_adder.svg
I know I am only an anonymous IP address, but I found this image that doesn't work. Just click on it. KTHXBYE --81.38.207.248 (talk) 22:22, 16 February 2009 (UTC)
 * Indeed. Thanks for letting me know. I will repair it soon. User A1 (talk) 00:04, 17 February 2009 (UTC)
 * I fixed this a long time ago, but forgot to upload it, and recently found the file on my computer. The def section of the SVG was causing the trouble, but I don't know why. User A1 (talk) 02:26, 20 May 2009 (UTC)

image:Mongolia-sums.svg
The thumbnails of my newly uploaded image:Mongolia-sums.svg look strange. It's a converted file from a corresponding shape file from The Map Library using ArcView Shapefile to SVG converter which are ok in inkscape 0.45, ie6 and opera 9.60. It did not save the file with inkscape - instead I just corrected some name1 fields in the text file to fit to wikipedia naming convention. katpatuka (talk) 16:42, 23 February 2009 (UTC)
 * Looks like you found a nasty aliasing bug in RSVG. The image was set to be only a few pixels wide. The mathematics in inkscape is performing the rendering correctly, but RSVG is not. This to me suggests that RSVG is using integers too early in their rendering process. All I had to do was make the canvas larger in terms of number of default pixels, which works around the maths bug. If you can get around to it, please submit a bug to librsvg, and let me know how it goes. I was able to reproduce this on my machine with RSVG 2.22.3 User A1 (talk) 18:20, 23 February 2009 (UTC)
 * Thanks, yes, it works now. Since I'm no svg-profi I leave the bugreport to you - it seems to me that you can explain the matter better than I ever could ;-) I didn't want to save with inkscape because it always adds some things not needed to the raw svg file, so I didn't check the canvas size... --katpatuka (talk) 18:44, 23 February 2009 (UTC)