CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFD-Wiki (https://www.cfd-online.com/Forums/cfd-wiki/)
-   -   suggestion : adding .svg to accepted file formats for file upload (https://www.cfd-online.com/Forums/cfd-wiki/92201-suggestion-adding-svg-accepted-file-formats-file-upload.html)

GeeZ September 6, 2011 04:09

suggestion : adding .svg to accepted file formats for file upload
 
Hello,

I would suggest to add *.svg format to the list of accepted formats for file upload. It can allow users to upscale existing diagrams or pictures as big as they want and it eases the improvement/modification of existing files by other wikians than the original author.

Bye

pete September 6, 2011 15:53

Good idea GeeZ. I have added svg support to CFD-Wiki. Please give it a try to see how it works. I have never used svg files myself.

GeeZ September 7, 2011 04:37

ok, just uploaded an svg.
Upload works, you can check it here :
http://www.cfd-online.com/Wiki/File:...wOfTheWall.svg

However, when you include an *.svg inside an article, it does not display as a picture, but merely as a link to a picture.

Well, depending on how we decide to use *.svg, it can be a problem or not :
1. if we consider that svg should always be prefered to other kinds of image formats, because it can upscaled and modified at wish, then this is a problem.
2. or we can consider that articles must always include bitmap images (*.jpeg, *.png, etc) because *.svg might not be supported by all web browsers (especially older ones), In the case where the bitmap files are exports from *.svg, then it could be handy to have the *.svg uploaded on cfd-online but not displayed on the articles' page, merely linked with the *.png file's page somehow. In case someone would like to have the svg version, then they should be able to access it by following links, but it won't be inserted in the article itself.

Maybe we should have a look on wikipedia to see how they manage *.svg. I am sure I already saw *.svg files on wikipedia, but it has been some time since I last saw one. If I recall properly, the image displayed on the article is always a bitmap file (say a *.png) and when you click on it, you access to a bigger *.png file, and when you click on this bigger *.png file you access to the original *.svg .
This could be a good way to make sure that images will always be displayed properly no matter which web browser the visitor uses, while being able to take advantage of svg files strong points.
Well, *svg should be supported by any modern web browser now (I think it took some time for I.E. to support it, but it now does). However, some visitors might visit cfd-online from their workplace, and if they use Internet Explorer 6, it sure won't support *.svg - actually it doesn't support transparency on *.png either...)


If you want to play with *.svg files just to see what it is like and why it can be interesting to use, I would recommand the software inkscape (free & opensource). You might want to play around with the file I just uploaded to figure out what *.svg is all about.

pete September 7, 2011 13:55

I added some settings for svg->png conversion and I thought that it would work the way you suggest (using svg images directly in the text). I will look more at it tomorrow to try to find the problem. The settings I added for svg are:

Code:

$wgFileExtensions[] = 'svg';
$wgAllowTitlesInSVG = true;
$wgSVGConverter = 'rsvg';
$wgSVGConverterPath = "/usr/bin";

And I verified that the server has /usr/bin/rsvg installed to be able to do svg->png conversions.

GeeZ September 14, 2011 05:06

Well it seems the *.svg picture still can't be displayed as a bitmap on the following page : http://www.cfd-online.com/Wiki/File:...wOfTheWall.svg
How is your progress going on the *.svg->*.png conversion issue ?
Seems to be harder to do than it sounds... Keep it up ! ;)

pete September 14, 2011 07:33

No progress yet, sorry, I haven't had time to had time to debug it yet.


All times are GMT -4. The time now is 08:58.