gimp python, svg.
, , , .
https://gist.github.com/thorsummoner/3ad6f806f1c08246f240222a3c0a5c47
gimp ( ).
, ~/.gimp-2.8/plug-ins/file-svg-export.py, - %appdata%.
import gimpfu
def register_save_handlers():
gimpfu.gimp.register_save_handler('file-svg-save', 'svg', '')
def save_svg(img, drawable, filename, raw_filename):
gimpfu.gimp.pdb.gimp_vectors_export_to_file(img, filename, None)
gimpfu.register(
'file-svg-save',
'save an SVG (.svg) file',
'save an SVG (.svg) file',
'Dylan Grafmyre',
'Dylan Grafmyre',
'2016',
'SVG',
'*',
[
(gimpfu.PF_IMAGE, "image", "Input image", None),
(gimpfu.PF_DRAWABLE, "drawable", "Input drawable", None),
(gimpfu.PF_STRING, "filename", "The name of the file", None),
(gimpfu.PF_STRING, "raw-filename", "The name of the file", None),
],
[],
save_svg,
on_query = register_save_handlers,
menu = '<Save>'
)
gimpfu.main()
File → Export As, your file.svg
svg.