Command Line Options in 046 (--verb & --select)
I've been playing with the new --verb and --select command line options available in Inkscape 046. Very cool! However, I haven't been able to figure out how to control certain functions like "trace bitmap".
I'd like to do the following operations in order at the command line:
Import a bitmap file Select the imported bitmap Trace it using a custom threshold setting Delete the imported bitmap Select the resultant path Fit page to selection Save to Inkscape SVG
So far, I've only been able to import the bitmap and select it using the following command line entry:
"C:(full path to inkscape)\inkscape.exe" --verb=FileImport "C:(full path)\testimg.png" --verb=EditSelectAll verb=SelectionTrace
Running this command causes the inkscape gui to start, import the png, and select it. However, it won't trace the image. All it does it open the "trace bitmap" dialog. Another weird thing is that the "select file to import" dialog remains open even after the image import is complete. Is that normal, and how do I close it via the command line?
Any help would be greatly appreciated. BTW, I'm using the win32 build.
Thanks,
mb
____________________________________________________________________________________ Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+ki...
On 6/9/07, Mike Bee <tu55r@...12...> wrote:
Import a bitmap file Select the imported bitmap Trace it using a custom threshold setting Delete the imported bitmap Select the resultant path Fit page to selection Save to Inkscape SVG
All of this is much easier to do with potrace command line UI. Inkscape uses potrace internally for tracing. See potrace.sourceforge.net
Running this command causes the inkscape gui to start, import the png, and select it. However, it won't trace the image. All it does it open the "trace bitmap" dialog.
Yes, because the SelectionTrace verb actually means "open trace dialog". If you want to to autotrace bitmap without any manual intervention, you need to create a different verb for that.
Another weird thing is that the "select file to import" dialog remains open even after the image import is complete. Is that normal, and how do I close it via the command line?
On this I have no idea. Ted?
On Fri, 2007-06-08 at 21:39 -0700, Mike Bee wrote:
So far, I've only been able to import the bitmap and select it using the following command line entry:
"C:(full path to inkscape)\inkscape.exe" --verb=FileImport "C:(full path)\testimg.png" --verb=EditSelectAll verb=SelectionTrace
Running this command causes the inkscape gui to start, import the png, and select it. However, it won't trace the image. All it does it open the "trace bitmap" dialog. Another weird thing is that the "select file to import" dialog remains open even after the image import is complete. Is that normal, and how do I close it via the command line?
Well, the reason here is because it's not doing what you're expecting. Unfortunately there isn't anyway to pass parameters to verbs. So, the command line is getting broken into two sets of commands.
One: "c:(full path)\testimg.png"
Two: --verb=FileImport --verb=EditSelectAll --verb=SelectionTrace
So Inkscape is opening the file you've specified -- and the default way to open PNGs is to put them into an SVG wrapper similar to import. Then, after it is your document, the verb FileImport is being called. So, things should behave the same without the FileImport verb, except that the dialog won't be shown.
--Ted
participants (3)
-
bulia byak
-
Mike Bee
-
Ted Gould