Inkscape.org
Beyond the Basics Error parsing option -a
  1. #1
    Wiz Wiz @Wiz

    I've updated an old project from python2 to python3.

    Its graphics are provided as a big SVG file and extracted into separate PNG files using inkscape.

    The script was using such an old version of inkscape that it was still using -z. I found that this is obsolete and can just be removed.

    Now it fails with:

    # inkscape -a 800:480:860:540 -w64 -h64 -o graphics/icon.png graphics/graphics.svg
    Error parsing option -a

    Reading the man page this looks ok to me. What is the problem?

    If you want to try yourself, the input file is available in https://github.com/0-wiz-0/monsterz

     

  2. #2
    inklinea inklinea @inklinea⛰️

    this might work 

    inkscape --actions="export-area:800:480:860:540;export-width:64;export-height:64;export-filename:graphics/icon.png;export-do;" ./graphics.svg
     

  3. #3
    Wiz Wiz @Wiz

    Thanks, @inklinea, that did indeed help.

    I have more problems because the inkscape version this was created with is so old that the DPI changed, and the coordinates also seem to be wrong (did up/down, i.e. y-coordinate zero, switch at some point in the inkscape past?), but I think I can manage now.