Inkscape.org
Using Inkscape with Other Programs Inkscape with PowerShell... help ^^'
  1. #1
    JDragonB JDragonB @JDragonB

    I try to convert my SVG with this command line : & "C:\Program Files\Inkscape\bin\inkscapecom.com" --export-type=jpg --export-filename="E:\Scripts\Meteo bot\Data\Meteo.jpg" "E:\Scripts\Meteo bot\Data\Meteo.svg"

    But i have this answer: 

    (org.inkscape.Inkscape:4816): GLib-WARNING **: 20:46:50.151: passing a child setup function to the g_spawn functions is pointless on Windows and it is ignored
    Script Error
    ----
    Traceback (most recent call last):
      File "C:\Program Files\Inkscape\share\inkscape\extensions\raster_output_jpg.py", line 28, in <module>
        JpegOutput().run()
      File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 249, in run
        self.load_raw()
      File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 263, in load_raw
        document = self.load(self.file_io)
      File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\extensions.py", line 171, in load
        self.img = Image.open(stream)
      File "C:\Program Files\Inkscape\lib\python3.10\site-packages\PIL\Image.py", line 3280, in open
        raise UnidentifiedImageError(msg)
    PIL.UnidentifiedImageError: cannot identify image file <_io.BufferedReader name='C:\\Users\\jdrag\\AppData\\Local\\Temp\\ink_ext_XXXXXX.svg9RULD2'>

    ----
    int InkFileExportCmd::do_export_extension(SPDocument*, const std::string&, Inkscape::Extension::Output*): Failed to save org.inkscape.raster.jpg_output to: E:\Scripts\Meteo bot\Data\Meteo.jpg

     

    If i try to open this file with Inkscape and save it in jpg : no problem.

    Can you help me?

     

     

    Meteo
  2. #2
    inklinea inklinea @inklinea⛰️

    I've found it does not work.

    inkscapecom.com --actions="export-filename:test.jpg;export-do" drawing.svg

    gives the same error for Inkscape 1.3

    I would use .png instead and batch convert to jpg using any of the free programs available 

  3. #3
    JDragonB JDragonB @JDragonB

    You're right: no problem with png !

    Thanks.