CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > CFD Online Community > CFD-Wiki

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

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 6, 2011, 05:09
Lightbulb suggestion : adding .svg to accepted file formats for file upload
  #1
New Member
 
Join Date: Sep 2011
Posts: 3
Rep Power: 15
GeeZ is on a distinguished road
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
GeeZ is offline   Reply With Quote

Old   September 6, 2011, 16:53
Default
  #2
Administrator
 
pete's Avatar
 
Peter Jones
Join Date: Jan 2009
Posts: 682
Rep Power: 10
pete will become famous soon enough
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.
pete is offline   Reply With Quote

Old   September 7, 2011, 05:37
Default
  #3
New Member
 
Join Date: Sep 2011
Posts: 3
Rep Power: 15
GeeZ is on a distinguished road
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.
GeeZ is offline   Reply With Quote

Old   September 7, 2011, 14:55
Default
  #4
Administrator
 
pete's Avatar
 
Peter Jones
Join Date: Jan 2009
Posts: 682
Rep Power: 10
pete will become famous soon enough
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.
pete is offline   Reply With Quote

Old   September 14, 2011, 06:06
Default
  #5
New Member
 
Join Date: Sep 2011
Posts: 3
Rep Power: 15
GeeZ is on a distinguished road
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 !
GeeZ is offline   Reply With Quote

Old   September 14, 2011, 08:33
Default
  #6
Administrator
 
pete's Avatar
 
Peter Jones
Join Date: Jan 2009
Posts: 682
Rep Power: 10
pete will become famous soon enough
No progress yet, sorry, I haven't had time to had time to debug it yet.
pete is offline   Reply With Quote

Reply

Tags
file, format, svg, upload


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 17:02
pisoFoam compiling error with OF 1.7.1 on MAC OSX Greg Givogue OpenFOAM Programming & Development 3 March 4, 2011 18:18
gcc and executable file from Mac to Linux simone Marras Main CFD Forum 0 April 8, 2007 16:49
Results saving in CFD hawk Main CFD Forum 16 July 21, 2005 21:51
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16


All times are GMT -4. The time now is 16:33.