inkscape

Converting svg to png with inkscape command line failing

烈酒焚心 提交于 2019-12-22 08:04:25
问题 I feel like I must be doing something silly wrong, but I just can't get this to work. This is the command I am running from cmd: inkscape.com "C:\path\ship.svg" -e --export-png="C:\Path\ship.png" --without-gui In return, I get: WARNING: File path "--export-png=C:\path\ship.png" includes directory that doesn't exist. It does exist. What am I missing? 回答1: -e and --export-png are the same argument, according to the docs. -e is just the short version. So you should use either one, but not both.

Run inkscape in PHP

旧时模样 提交于 2019-12-22 04:54:24
问题 I need to run inkscape in PHP so I can convert an svg image to PDF. However every time I try: //some PHP code system("inkscape -z --file=svg.svg --export-pdf=pdf.pdf"); //more code I get no new file and I get this in the apache erro log. (inkscape:28607): libgnomevfs-WARNING **: Unable to create ~/.gnome2 directory: Permission > denied Emergency save activated! Emergency save completed. Inkscape will close now. If you can reproduce this crash, please file a bug at www.inkscape.org with a

SVG to PNG with multiple image layers using PHP

帅比萌擦擦* 提交于 2019-12-21 12:25:45
问题 I convert svg to png image with this code <?php exec('/usr/bin/rsvg-convert -w 1000 -h 1000 tshirt.svg -o tshirt.png'); ?> This works with a single svg image. Actually i have an svg image which contains multiple layers of images like: 1st layer -: this is the background T-shirt image which is transparent 2nd layer -: this is another T-shirt image which contains color 3rd layer -: this is the small sticker image which should be placed on the T-shirt My svg code is -: <?xml version="1.0"

How to use xaml vector images as image source in Windows 8 app

雨燕双飞 提交于 2019-12-21 08:21:12
问题 I created some assets in inkscape and would like to use them as icons in a windows 8 application. I have done some reading and it seams that while .Net 4.5 supports SVG, the modern ui profile does not. I converted the svg to xaml using this tool. I get the following xaml. <Canvas xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="svg2997" Width="744.09448" Height="1052.3622" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> <Canvas x:Name="layer1"> <Path Fill="

Is there an efficient way to store 2D plots as a vector graphic in python?

橙三吉。 提交于 2019-12-21 06:17:46
问题 I'm currently trying to store python plots as vector graphics to improve their appearance in a latex document. For 1D plots this works quite fine: import numpy as np import matplotlib as mpl mpl.use('svg') new_rc_params = { "font.family": 'Times', "font.size": 12, "font.serif": [], "svg.fonttype": 'none'} #to store text as text, not as path mpl.rcParams.update(new_rc_params) import matplotlib.pyplot as plt x = np.linspace(-.5, .5, 1024) plt.figure() plt.plot(x, x) plt.title('\$x = y\$') plt

Split shape defined by path into sub-paths [closed]

£可爱£侵袭症+ 提交于 2019-12-20 09:09:31
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I am attempting to split a closed path to sub-paths, the image is of a tree and I want to be able to easily manipulate branches by dividing them from the path between two nodes and then recombining later. I have tried "Break apart" and "Cut Path" but neither work predictably (annoyingly, it worked for one branch

ProcessBuilder vs Runtime.exec()

只谈情不闲聊 提交于 2019-12-18 04:48:10
问题 I'm trying to create a frontend app in Java to handle batch SVG conversions using Inkscape's command line feature. I'm taking and updating the code from https://sourceforge.net/projects/conversionsvg/. The way the original developer handled calling Inkscape by Runtime.getRuntime().exec(String) . The issue I'm running into is some inconsistencies between using methodA and methodB. I created a simple java test project to demonstrate the different actions being performed. CallerTest.java package

Removing transforms in SVG files

試著忘記壹切 提交于 2019-12-17 03:22:20
问题 I have been struggling with this for a while, and can't seem to find an answer (that works) anywhere. I have an SVG file which looks like this: <svg xmlns:dc="http://purl.org/dc/elements/1.1/" ... width="72.9375" height="58.21875" ...> ... <g ... transform="translate(10.75,-308.96875)" style="..."> <path inkscape:connector-curvature="0" d="m -10.254587,345.43597 c 0,-1.41732 0.17692,-2.85384 0.5312502,-3.5625 0.70866,-1.41733 2.14518,-2.82259 3.5625,-3.53125 1.41733,-0.70866 2.11392,-0.70867

CSS attribute namespace selector in SVG

半城伤御伤魂 提交于 2019-12-13 12:51:37
问题 I'm trying to use the following CSS to automatically set the style for <g> Elements. <style type="text/css"> g[inkscape|label="Site"] { fill: blue; stroke: red; stroke-width: 3 } g[inkscape|label="Building"] { fill: black; stroke: red; stroke-width: 3 } </style> However the elements remain without fill or stroke settings set. Selecting another attribute without a namespace works fine. Thank you. 回答1: This depends what the context of the question is. Is the SVG a stand-alone file, embedded in

Expand a relative path in Ant script, for Inkscape

此生再无相见时 提交于 2019-12-12 12:33:11
问题 I'd like to write an Ant script that calls an external utility (Inkscape, in fact) that needs a full path. Right now I have <exec executable="${inkscape.path}"> <arg value="--file=build_exe/splash.svg" /> <arg value="--export-png=build_exe/splash.png" /> <arg value="-C" /> </exec> On Windows, Inkscape requires absolute paths. So how can I coax Ant to make build_exe/filename into an absolute path for me? Or, alternately, is there a workaround for Inkscape (maybe setting the working directory)?