Stand alone inkscape version for servers
Hello folks, we are trying to include the functionality of converting svg files to png in our web content management system ( ccHost ) mostly for ( openclipart.org ), I tried every possible solution using imagemagick and GD, but nothing did the job as of inkscape, so we decided to actually use inkscape for that ( below the php function that do this ), that cleared the biggest problem, but still have another one: inkscape have a GUI that means a lot of stuff needed to be installed on a "web server " to get inkscape running, but we are using inkscape from the command line and we don't need all that fancy GUI things..
So can you please help us shipping ( or doing this if possible for us ) a stand alone ( one file only ) copy of inkscape without GUI, just the command line, in case we got a one file inkscape binary we can use in a lot of content management systems to actually add the functionality of converting and handling SVG files
it will be great if some one can do it, we need such thing a lot
Thank you all in advance.
Best regards, Bassel Safadi
_______________________________________ php function that can handle svg to png converting using inkscape:
function convert_svg_png($path_to_inkscape, $svg_default_background, $images_path, $filename){ $filenamepng = str_replace(".svg", ".png", $filename); //check if inkscape is exists exec("".$path_to_inkscape."inkscape -V", $checkversion); if ($checkversion[0]){ exec("".$path_to_inkscape."inkscape -e ".$images_path.$filenamepng." ".$images_path.$filename." --export-background=".$svg_default_background."", $output); }else{ $output = "<b>Fatel Error: </b>Can't find (inkscape)"; } return $output; }
Bassel Safadi wrote:
Hello folks, we are trying to include the functionality of converting svg files to png in our web content management system ( ccHost ) mostly for ( openclipart.org http://openclipart.org ), I tried every possible solution using imagemagick and GD, but nothing did the job as of inkscape, so we decided to actually use inkscape for that ( below the php function that do this ), that cleared the biggest problem, but still have another one: inkscape have a GUI that means a lot of stuff needed to be installed on a "web server " to get inkscape running, but we are using inkscape from the command line and we don't need all that fancy GUI things..
So can you please help us shipping ( or doing this if possible for us ) a stand alone ( one file only ) copy of inkscape without GUI, just the command line, in case we got a one file inkscape binary we can use in a lot of content management systems to actually add the functionality of converting and handling SVG files
it will be great if some one can do it, we need such thing a lot
Just a curiosity, how would one go about this? Is this a new executable target like inkview that would parse SVG and generate output files?
Aaron Spike
On Wed, 2008-09-24 at 13:45 -0500, Aaron Spike wrote:
Bassel Safadi wrote:
So can you please help us shipping ( or doing this if possible for us ) a stand alone ( one file only ) copy of inkscape without GUI, just the command line,
Just a curiosity, how would one go about this? Is this a new executable target like inkview that would parse SVG and generate output files?
Yes, but. I think you'll also have to rearrange a lot of the files to remove the GTK+ dependencies that are in them. A lot of GTK stuff has been pushed into GLib with wrappers located in the GTK library. So you'd probably have to figure out where these are and push them down also. A lot of that work was driven by the GStreamer folks wanting to not depend on a GUI also.
All in all, I would say it is possible. But it is a significant amount of work. If we're shipping three binaries it'd probably be worth looking at building shared libraries instead of static ones... I'll do that if you do the rest ;)
--Ted
Ted Gould wrote:
On Wed, 2008-09-24 at 13:45 -0500, Aaron Spike wrote:
Bassel Safadi wrote:
So can you please help us shipping ( or doing this if possible for us ) a stand alone ( one file only ) copy of inkscape without GUI, just the command line,
Just a curiosity, how would one go about this? Is this a new executable target like inkview that would parse SVG and generate output files?
Yes, but. I think you'll also have to rearrange a lot of the files to remove the GTK+ dependencies that are in them. A lot of GTK stuff has been pushed into GLib with wrappers located in the GTK library. So you'd probably have to figure out where these are and push them down also. A lot of that work was driven by the GStreamer folks wanting to not depend on a GUI also.
So that's the concept. Can anyone give a simplified outline of the process a person should follow to accomplish this? What you said above means that we should find GTK functions and types in the code and replace them with GLib functions and types? How will these be located? How will progress be measured and tested?
All in all, I would say it is possible. But it is a significant amount of work. If we're shipping three binaries it'd probably be worth looking at building shared libraries instead of static ones... I'll do that if you do the rest ;)
Heh, deal.
Aaron Spike
So much work! ;)
Aaron Spike wrote:
Ted Gould wrote:
On Wed, 2008-09-24 at 13:45 -0500, Aaron Spike wrote:
Bassel Safadi wrote:
So can you please help us shipping ( or doing this if possible for us ) a stand alone ( one file only ) copy of inkscape without GUI, just the command line,
Just a curiosity, how would one go about this? Is this a new executable target like inkview that would parse SVG and generate output files?
Yes, but. I think you'll also have to rearrange a lot of the files to remove the GTK+ dependencies that are in them. A lot of GTK stuff has been pushed into GLib with wrappers located in the GTK library. So you'd probably have to figure out where these are and push them down also. A lot of that work was driven by the GStreamer folks wanting to not depend on a GUI also.
So that's the concept. Can anyone give a simplified outline of the process a person should follow to accomplish this? What you said above means that we should find GTK functions and types in the code and replace them with GLib functions and types? How will these be located? How will progress be measured and tested?
All in all, I would say it is possible. But it is a significant amount of work. If we're shipping three binaries it'd probably be worth looking at building shared libraries instead of static ones... I'll do that if you do the rest ;)
Heh, deal.
Aaron Spike
Thanks for helping on this! It might be easier to work the other way and use Cairo to create PNG thumbnails with an apache module which can be used to provide decent SVG.
I wonder if it would be easier to make something like inkserve like inkview that only does this type of processing. Regardless, this refactoring would have to happen to get it to a lean state.
Bassel, we can chat about in #openclipart more...#inkscape is also good too...the refactoring has been a goal for ages, but not sure if this will frustrate/block you prior to completion ;)
Jon
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
On Fri, 2008-09-26 at 13:40 +0800, Jon Phillips wrote:
Thanks for helping on this! It might be easier to work the other way and use Cairo to create PNG thumbnails with an apache module which can be used to provide decent SVG.
Well, that's what rsvg and svg2png does. There is also an old, probably out of date, Apache module in the Inkscape file repositories that does this using rsvg.
One problem with rsvg is that it doesn't do anything other than the blur filter and won't do text on a path.
--Ted
On Thu, 2008-09-25 at 05:52 -0500, Aaron Spike wrote:
So that's the concept. Can anyone give a simplified outline of the process a person should follow to accomplish this? What you said above means that we should find GTK functions and types in the code and replace them with GLib functions and types? How will these be located? How will progress be measured and tested?
Heh, I'd probably just change the linking so that you only get glib and not gtk and see what breaks :) The linker does most of your testing here.
I imagine a lot of this work will also involve splitting some of our objects (Views perhaps) into GUI and non-GUI versions inheriting from the same base class. A lot of this infrastructure exists, it just needs to be completed and tested.
--Ted
While not a stand alone there has been a "command line server" mode added SVN recent-ish https://bugs.launchpad.net/inkscape/+bug/259303
Joshua L. Blocher verbalshadow
participants (5)
-
Aaron Spike
-
Bassel Safadi
-
Jon Phillips
-
Joshua L. Blocher
-
Ted Gould