Commons:Graphics village pump/April 2008

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

PNG rendering of SVG is blank[edit]

I've got a weird problem that I've not come across before. I have vectorised all the letters in Old Turkic script and was just about to upload them, however, the first of the bunch is producing a blank png thumb, but the actual svg is rendering fine, see here Image:Old Turkic letter A.svg. Anybody have any ideas why? Would it be because the svg file size is so small? I don't want to upload the other 38 only to have to correct something in them all! — Ch1902 13:46, 1 April 2008 (UTC)

Scratch that. It must have been updating inkscape that did it. I went back to 0.45 re-saved and uploaded and now it's fine :/ — Ch1902 19:27, 1 April 2008 (UTC)

SVG Problem[edit]

I uploaded Image:Pittodrie map.svg but I can't see it... WeBuriedOurSecretsInTheGarden 11:12, 1 April 2008 (UTC)

I've removed the reference to a local file that was still in it. Now it works, but it looks like you forgot to trace some parts. --rimshottalk 11:34, 1 April 2008 (UTC)
Indeed...still getting to grips with Inkscape. Thanks! WeBuriedOurSecretsInTheGarden 11:47, 1 April 2008 (UTC)

Spurious padding in SVGs from Illustrator CS3[edit]

Yes check.svg Resolved

Let me first say: SVG implementations suck. Okay, now I can continue.

Can someone look at Image:CIE illuminants D component S2.svg and tell me why there is a giant border at the bottom right? I drew the bounding box tightly in Illustrator, yet this is how it looks after being uploaded to the Commons. When I downloaded the uploaded file to examine it in Illustrator, sometimes it looked wrong, and sometimes it looked right (depending on which version of SVG I exported the image in.) Either way, the MediaWiki rendering was wrong. What is causing it to create that padding? --Adoniscik(t, c) 19:43, 4 April 2008 (UTC)

  1. Wiki and/or web pages don't render SVG -- the browser does that.
  2. The svg is valid, and I have a message from the w3c for you which is "Congratulations"
  3. Inkview -- an svg rendering application that comes with inkscape renders this SVG the same way that firefox does.
  4. Inkscape shows that the drawing exceeds the page which it is defined to occupy. I could fix it for you except that the XML that your application produced looks horrible in the inkscape XML editor which makes the task that much bigger. Inkscape has a button that tells the page size to fit the selection, I selected the graph and used that button. Inkscape can also make the image centered on the page -- I have no idea if your application is capable of doing all of that but I highly recommend investigating these options. If the advertisement is accurate, your application should be easier to use than the one I am using. -- carol 01:16, 5 April 2008 (UTC)
Correction. SVG rendering is actually done by the MediaWiki software. What's presented to the browser is a png image. Anyhow I opened the image in Inkscape and the image was incorrectly aligned with the "page" i.e. part of the image was outside. Anyhow centered it and reuploaded so it should work fine. If the missalignment wasn't visible in Illustrator then I recommend opening the files in Inkscape whenever something looks weird. /Lokal_Profil 01:49, 5 April 2008 (UTC)
As a side comment. Think there is a program called rsvg which renders the svg files in the same way as the MediaWiki software (not that it would have helped in this case). /Lokal_Profil 01:51, 5 April 2008 (UTC)
Thank you for the correction. I looked at a web page once that showed all of the different ways that different applications (or libraries) rendered the same SVG and assumed somethings from that. These browsers include a lot of code -- I wonder now what the heck they are actually doing on their own with all that stuff...? -- carol 04:40, 5 April 2008 (UTC)

Thank you very much for the support. I opened the offending file in Inkscape and indeed it appeared misaligned. The peculiar thing is that the corrected image now looked misaligned in Illustrator, suggesting something is wrong with it… Is there a way to use (lib)rsvg in Windows? --Adoniscik(t, c) 05:27, 5 April 2008 (UTC)

I looked for something that said that inkscape used it and did not find anything. The manpage for rsvg (which I guess I got when I installed librsvg for firefox) gives commandline instructions and a couple of addresses, one for sourceforge and gnome -- the sourceforge site has a source tarball available. I am kind of sorry it doesn't seem to be available for windows, it has been a while since I read a manpage to anyone.... The reason that I looked for inkscape needing it is because inkscape exports to png and there used to be a tendency to not duplicate things like this on linux, or at least a strong suggestion not to. Inkscape should be able to do most of what rsvg does from the commandline via the gui; if you want a different size then make the paper and the objects a different size. One thing about the free software, if the different projects output doesn't play well with the other free software, the projects don't get supported; so that might be the reason that inkscape files work well with wiki software, etc. I am just learning how to use inkscape -- Lokal has much more experience with this than me and anything I just suggested might very well be once again correctly corrected. Maybe the browser is doing the rendering when I look at just the file with it; it doesn't draw like a png then. -- carol 09:34, 5 April 2008 (UTC)

inverse colors on a logo I put up on the commons[edit]

Hi everybody,

I just uploaded a logo for usage in an article on the Austrian Literary Translators' Association, and it doesn't display properly but only with inverse, so it's just a big black splotch. When you click on the picture once and then once more, the colors switch and it looks ok, but nobody will do that... What did I do wrong?

Image is at the entry atÜbersetzergemeinschaft

Thanks for any ideas! -- WernR 09:43, 6 April 2008 (UTC)

I cleaned up a LOT of extraneous junk in the file with en:jpegtran, but the basic problem is that it's a CMYK JPEG, and Wikimedia wants RGB... AnonMoos 12:07, 6 April 2008 (UTC)
Well thanks, Ann -- does anyone know how to convert CMYK to RGB? (I just surfed around a bit but one very quickly gets bogged down in the techie lingo of Linux developer wizards...) -- WernR 12:52, 6 April 2008 (UTC)
It can't be done losslessly -- you have to open a file in an editing program (like Photoshop) that understands CMYK JPEG, change color mode to RGB, and then save it as a new and different JPEG file. P.S. I'm actually male...AnonMoos 15:07, 6 April 2008 (UTC)
I thought so, just pulling your anonymous leg :-) Okay, I solved the problem by asking the author for another file, a GIF this time which displays just perfect. Thanks for your help anyway! -- WernR 19:21, 6 April 2008 (UTC)

Downloading SVGs[edit]

Hi, I've just found the Graphics Lab on Wikipedia and want to get involved. I can use Inkscape to a basic level but I'm can't work out how to get an SVG file off the Commons (or Wikipedia) and onto Inkscape. If anyone could shine a light, that'd be great. Polishname 20:03, 22 April 2008 (UTC)

Go to an image description page such as Image:Maltese-Cross-Heraldry.svg, and right-click on the "Maltese-Cross-Heraldry.svg" link where it says "(SVG file, nominally 600 × 600 pixels, file size: 555 B)" and you should be presented with an option of downloading file to your local hard drive... AnonMoos 21:18, 22 April 2008 (UTC)
Thanks. I don't know why but it didn't give me the download option on Firefox although it's fine on Internet Explorer... Thanks anyway. Polishname 12:15, 23 April 2008 (UTC)
Firefox has it as "save link as". 哦,是吗?(висчвын) 17:03, 23 April 2008 (GMT)
You're right, it does. I feel a little stupid now... Thanks for the help anyway :) Polishname 20:18, 23 April 2008 (UTC)

Background of images after SVG→PNG conversion is black, not white[edit]

I have first observed this with the CorelDraw and Inkscape images on en:Group (mathematics), but it also affects my handmade images on en:Modular lattice. These images are served to the latest Firefox 2 ( in PNG format:

According to Help:SVG these images should have a transparent white background. But what I am seeing is only consistent with a transparent black background:

  • White background in Firefox 2
  • White background in Firefox 2 print preview
  • Black background when printing from Firefox 2 on a LaserJet 1020
  • White background of downloaded images in Windows image preview
  • Black background of downloaded images in Windows Paint and in Picture Publisher 8 (which ignores transparency information completely)

What's going on? Any chance that Commons' RSVG scripts have lost a parameter that used to tell them the (transparent) background is supposed to be white? Or that an RSVG update changed the default value or the supported methods for setting the background colour? --Hans Adler 09:07, 27 April 2008 (UTC)

Here's what the PNGCHECK program gives for file 200px-Rubik's_cube.svg.png:
File: 200px-Rubik's_cube.svg.png (25962 bytes)
  chunk IHDR at offset 0x0000c, length 13
    200 x 208 image, 32-bit RGB+alpha, non-interlaced
  chunk bKGD at offset 0x00025, length 6: red = 255 green = 255 blue = 255
  chunk tIME at offset 0x00037, length 7:  5 Mar 2008 21:53:48 GMT
  chunk IDAT at offset 0x0004a, length 8192
    zlib:  deflated, 32K window, default compression
  chunk IDAT at offset 0x02056, length 8192
  chunk IDAT at offset 0x04062, length 8192
  chunk IDAT at offset 0x0606e, length 1256
  chunk IEND at offset 0x06562, length 0
No errors detected in 200px-Rubik's_cube.svg.png (84.4% compression).

So the formal PNG "bKGD" chunk value is actually white, and a black "bKGD" value is not the problem here. However, my general conclusion is that PNG transparency is often more trouble than it's worth, and some months back I changed all my SVGs that consist of a black shape on a white background to be non-transparent, because I concluded that inconsistencies in transparent PNG display could sometimes prevent the basic informational content of such SVG files from appearing at all... AnonMoos 15:52, 27 April 2008 (UTC)

Thanks, that was very helpful. So the lesson for me is 1) pngcheck exists, and 2) Windows Paint and some other Windows programmes render transparent PNG backgrounds in black, regardless of the official colour. I will follow your example, then, once I have found out how to draw a white background. (I already know that it can't simply be set.) --Hans Adler 09:40, 28 April 2008 (UTC)

Fill a <rect... element with the same parameters as the overall image's "viewBox" or "width" and "height" parameters. The current version of the Maltese cross SVG linked in a previous section above is an example. AnonMoos 21:11, 28 April 2008 (UTC)

Ein Forum ist kein Amphitheater[edit]

Daher habe ich mir diese Änderung erlaubt. --Herrick 09:06, 29 April 2008 (UTC)

Kein Problem, ich weiss aber nicht, ob das hier der richtige Ort ist, das zu verkuenden ;) --rimshottalk 11:09, 29 April 2008 (UTC)
Da war ich mir ebenfalls unsicher. Aber wenn man am entsprechenden Template bildmäßig herumfrickelt, wird man tatsächlich an diesen Ort hin verwiesen. ;-) --Herrick 13:32, 30 April 2008 (UTC)

FEVE railmap[edit]

I have expanded the Dutch article over the FEVE railnetwork in Spain. (nl:Ferrocarriles de Vía Estrecha). There are no railmaps and I made do with partial maps and a picture. The material I used can be found in Category: "FEVE rail" in the commons.

I tried my own hand at drawing using Fotoschop 4 elements, but I get nowhere and get very frustated. The result is "FEVE map trial version.png". There is a fairly good map at de FEVE website I use as source in combination with other sources. There would probably need to be an inset or a seperate for the complicated Asturian railway network. For Cantabria there is the Cantabria ferrocarril.png map, is it possible to create a similar map for Asturia?

Can somebody help me? I'm willing to learn


Smiley.toerist 09:15, 24 April 2008 (UTC)

How can I remove grey borders around graphical elements in Illustrator?[edit]

Yes check.svg Resolved

I've uploaded the problematic svg image to the Commons: image Could somebody have a look at it and tell me how I am able to remove those ugly grey borders around the circle elements I used? I am using Illustrator for my svg projects. Thanks! (btw: these borders are NOT visible in Illustrator before exporting) --knowledgeisfree 23:44, 29 April 2008 (UTC)

Ok, I found a way around this problem myself. I added another grey background with the shape of the coat outline to make the gaps disappear. Image will be updated shortly. --knowledgeisfree 19:52, 30 April 2008 (UTC)