Commons:Graphics village pump/September 2010

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

Bad SVG preview depending on zoom size[edit]

107 px wide
108 px wide

(moved from HelpDesc to here) Hi, I've got problems with a (valid) SVG image. As you can see on the right, for some (most of the) zoom values the graph is missing. The plot is a cubic curve that can be represented exactly by means of a cubic bézier, so it is nothing special as far as the svg source is concerned. The green path in question is at line 99 of the svg source:

<path stroke="#4b4" d="M 9 27 C -3 -27 -3 27 9 -27" />

There were probs with the svg preview engine some weeks ago. Are this remains from these problems? --Georg-Johann (talk) 10:06, 4 September 2010 (UTC)[reply]

I removed the clipping path, and it seems to be working. If you want a spiky point at the origin (0,0), then you should adjust the miter limit... AnonMoos (talk) 10:42, 4 September 2010 (UTC)[reply]
Wait, actually there's only one segment on the path, so miterlimit won't have an effect. If you want a sharp joining of two curves, then you should have two actual curves in the SVG file, with (0,0) as a curve ending or beginning point. Not too sure how to express an arbitrary quadratic curve in terms of cubic beziers, though -- the only attempt that I've made along those lines was trying to express an Archimedean spiral in terms of cubic beziers, and I never really got it 100% rigorously mathematically correct... AnonMoos (talk) 11:01, 4 September 2010 (UTC)[reply]

Thanks. I just added the clipping as a precaution because some of my local renderers didn't manage to display the cusp nicely. Is there anything wrong with that clipping? I think it is correct and the thing reveals a bug in commons render engine. The only thing that is unusual is that the bézier has all its end and control points outside of the image.

The class of curves that can be represented exactly by means of svg elements is quite limited and a subset of finite-length parts of algebraic curves (and, of course, curves that can be composed piecewise thereof, have not a power greater than 3 (but by far not all of them)). Archimedian spirals don't belong to that class. --Georg-Johann (talk) 15:21, 4 September 2010 (UTC)[reply]

Well, I imported the curve into Fontographer (it would be considered highly "pathological" from the point of view of font outlines, by the way, due to the strongly-intersecting tangent lines) and tried to split it symmetrically along the X-axis, and this is what I came up with:
  M 9 27
  C 3 0 0.07393325 0 0.00136719 0
  C 0.07393325 0 3 0 9 -27
According to Fontographer, the original curve doesn't quite go through the (0,0) origin point... AnonMoos (talk) 15:33, 6 September 2010 (UTC)[reply]

Hmmm. The original curve meets (0,0) exactly. The parameter is 1/2 in the original bézier, so just evaluate the curve for t=1/2 to observe that all coordinates evaluate exactly to zero: 1/8·(P0+3·P1+3·P2+P3) = (0,0). The coordinates of Fonto obviously incorporate rounding errors. All "0.0..." stuff should be 0. --Georg-Johann (talk) 14:58, 17 September 2010 (UTC)[reply]

I found this broken SVG in which I attempted a fix by removing unused defs. Apparently that didn't work, so can someone have a check and see if it can be fixed? Thanks! ZooFari 14:51, 6 September 2010 (UTC)[reply]

Eliminated all <A> elements and &quot;'s... AnonMoos (talk) 16:17, 6 September 2010 (UTC)[reply]

Newbie question.[edit]

I may from time to time be interested in helping on projects in the graphics lab. I don't anticipate being a huge contributor but I may volunteer for some projects here. How does the current process work? Is there anything I need to know about picking up projects in the graphics lab, or do people simply self-select and just start working on something that interests them? Do I just upload the finished work "over the top" of the original file name for cleanups and/or using a new file name for derivatives (all properly licensed, of course)?

Any advice or corrections to the above would be appreciated. --GoRight (talk) 20:25, 17 September 2010 (UTC)[reply]

Just pick a request you like and start working on it! Remember to add {{I take|GoRight}} below "Graphist Opinion" so you don't end up working on the same request as another graphist. Once you finish the request, add {{done}}. You can overwrite the original file when you do a simple modification, like removing a watermark, border or small distractions, or color correction etc. Upload a new file when you've done a major modification or converted to a new format. It's recommended that the new file name should include the original file name with the addition of the modification you've done (e.g. example file - B&W.jpg, example file - restored.jpg, or you can use edited, modified, optimized if you've done various edits). If you're uploading in a new format, you can keep the file name as it is, so you can have example file.jpg, example file.png and example file.svg all at the same time. That's about it. Hope you enjoy being around the lab! Regards, -- Orionisttalk
Excellent, that helps. Thanks. --GoRight (talk) 00:01, 18 September 2010 (UTC)[reply]

A few clues please[edit]

Can an expert give me a few clues what I and my friend Inkscape did wrong here. File:Oppidum des Castels.svg And maybe suggest what I should do to debug similar cases?--ClemRutter (talk) 21:56, 17 September 2010 (UTC)[reply]

Adobe SVG plugin reports a "bad CSS property or descriptor declaration" error, but no line number, so I really can't track it down... AnonMoos (talk) 23:00, 17 September 2010 (UTC)[reply]
Fixed that, but the file still doesn't display properly... AnonMoos (talk) 00:51, 21 September 2010 (UTC)[reply]
Done. I re-saved it with Illustrator and it displays fine right now. I also allowed myself to crop the empty space and remove borders, I hope you don't mind. I failed to find out what was wrong with the original file, so it's still a mystery, a fixed mystery, though. regards, -- Orionisttalk 13:01, 21 September 2010 (UTC)[reply]

SVG files not uploading correctly[edit]

Hi, whenever I upload an SVG file to wikipedia it doesn't actually show the image. It says it has uplaoded, the resolution shown is correct, but rather than showing the image wanted it displays the grey & white checkerboard. Any help that can be given would be greatly appreciated OisinisiO (talk) 21:39, 19 September 2010 (UTC)[reply]

You have a link to a file on your harddrive in the SVG : file:///C:/Users/Phil/Desktop/Oisin's%20Folder/Ventures/Logo/inkscape_pasted_image_20100919_191938.png Uwe Dedering (talk) 08:18, 20 September 2010 (UTC)[reply]
How am I supposed to save inkscape files then, ps. I am not actually saving them to that destination OisinisiO (talk) 16:12, 20 September 2010 (UTC)[reply]
Don't embed bitmap graphics in vector files that you intend to upload to Commons. Commons only handles SVG files if they are purely vector-based. LX (talk, contribs) 16:20, 20 September 2010 (UTC)[reply]
That's not quite true; rasters are allowed if properly embedded within the SVG file (not externally linked), but there are limitations... AnonMoos (talk) 00:45, 21 September 2010 (UTC)[reply]
Would this have anything to do with the fact that there files are ones that I have vectorized from a Bitmap Image??? If so how can I resolve this issue? OisinisiO (talk) 21:28, 20 September 2010 (UTC)[reply]
OisinisiO -- I can't tell you what to do in Inkscape, but over the years I've fixed probably about a hundred SVG files which have the same problem that your file did by opening them up in a text editor and removing the <image tag... AnonMoos (talk) 00:45, 21 September 2010 (UTC)[reply]
Sorry for sounding like a complete noob but how exactly do you do this because I am not that used to opening up images in text editing programs :) OisinisiO (talk) 16:09, 21 September 2010 (UTC)[reply]
Since you seem to be running Windows, try Windows Notepad or Wordpad. I'm kind of unusual among people who upload SVGs to Wikimedia Commons -- I use Inkscape for testing and converting SVG files, but I don't actually use Inkscape for editing SVG files (which is why I can't give you advice as to what to do in Inkscape, except maybe that it's usually better to save as "Plain SVG")... AnonMoos (talk) 20:07, 21 September 2010 (UTC)[reply]
P.S. SVG is actually basically a text format (XML), as you'll see if you open an SVG file in an editor. AnonMoos (talk) 20:13, 21 September 2010 (UTC)[reply]

SVG image not displaying[edit]

svg file

I have an error with this svg file :

Error creating thumbnail:
librsvg-ERROR **: _rsvg_acquire_xlink_href_resource called for external resource: " base: (null)

aborting...

Okki (talk) 11:31, 21 September 2010 (UTC)[reply]

It's not convenient for me to download an 18-meg file right now, but one quick check is to see that the string <image is not included anywhere in the SVG file (see section directly above); sometimes that tag can be legit, but on Wikimedia Commons it far more often creates problems... AnonMoos (talk) 11:46, 21 September 2010 (UTC)[reply]
This fault (seams a editor bug, I found 2 locations of this in the file) I've mentioned this under marker in Commons:Transition_to_SVG#Limitations as quotes (you can correct my English) (For fix: Maybe you can try the new upload preview feature (mw 1.17) I've only a Netbook) --Perhelion (talk) 21:53, 16 February 2011 (UTC)[reply]

SVG font rendering is a mess[edit]

SVG font rendering is a mess. A real time waster.

I created a chart in Excel 2007 and saved it to PDF which looks fine in Acrobat reader. I then used Inkscape to convert the PDF to SVG. It seemed to work best when saved as "Plain SVG". (If saved in the "Inkscape SVG" default, there were problems with the fonts when previewed under Firefox.) I then uploaded the image under WikiMedia and included it in an article in Wikipedia.

The preview version of the chart was just awful. All the fonts were over-sized and truncated. It looked like a moron designed the chart. So after much searching I found that most common fonts on the PC are not supported in Wikipedia. So then I had to download Deja Vu fonts and Bitsream Vera fonts and go back and edit the Excel chart to use only those fonts. Then I had to repeat the Excel -> PDF -> Inkscape -> SVG -> Wikimedia -> Wikipedia pipeline.

The result still sucks. The preview bitmap that Wikipedia renders for the article from my SVG still sucks. If you click on it you get an even worse version. The PNGs are a little better but buggy. Only the final SVG when viewed directly under Firefox or IE 8 look good.

I'm sorry, but this it a lot of editing, massage, and modification. Far more than a person should have to do to post an article. Wikipedia is just a horrible user interface (text editing with bizarre commands that are similar to, but not exactly like, HTML). We need some sort of WYSIWYG editor that will correctly show an image in the editing article as well as the final article. Wikipedia article creation seems to cater too much to "expert" users, even though most articles are not written by computer science experts. And the system is just quirky enough that stuff you know from other systems won't exactly apply to Wikipedia.

Oh, and I still get the famous "bad CSS property or descriptor declaration" error anyway--which may, or may not, be an actual error.

This is the article: http://en.wikipedia.org/wiki/United_States_House_of_Representatives_elections,_2010 (mine is the Comparison chart). --15:23, 28 September 2010 User:NateOceanside

I looked at File:PoliticalDataWikiHouse 2010-09-15.svg (hope that's the right one). The quick-and-dirty fix is to convert text to paths in Inkscape. However, the fontsize of the text in your image was pretty small to start with. That would be fine for the printed page, maybe OK for a projected slide, but it can be problematic for an image which will be displayed at a relatively small pixel size in a Wikipedia article... AnonMoos (talk) 21:53, 28 September 2010 (UTC)[reply]